org.apache.felix.resolver.Util.isFragment()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(8.2k)|赞(0)|评价(0)|浏览(148)

本文整理了Java中org.apache.felix.resolver.Util.isFragment()方法的一些代码示例,展示了Util.isFragment()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.isFragment()方法的具体详情如下:
包路径:org.apache.felix.resolver.Util
类名称:Util
方法名:isFragment

Util.isFragment介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.osgi

private boolean isMandatory(ResolveContext rc, Requirement requirement) {
  // The requirement is optional
  if (Util.isOptional(requirement)) {
    return false;
  }
  // This is a fragment that is already resolved and there is no unresolved hosts to attach it to
  Resource resource = requirement.getResource();
  if (Util.isFragment(resource) && rc.getWirings().containsKey(resource)) {
    return false;
  }
  return true;
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.osgi

private boolean isMandatory(ResolveContext rc, Requirement requirement) {
  // The requirement is optional
  if (Util.isOptional(requirement)) {
    return false;
  }
  // This is a fragment that is already resolved and there is no unresolved hosts to attach it to
  Resource resource = requirement.getResource();
  if (Util.isFragment(resource) && rc.getWirings().containsKey(resource)) {
    return false;
  }
  return true;
}

代码示例来源:origin: org.eclipse/osgi

boolean isFragment = Util.isFragment(resource);
if (!isFragment && rc.getWirings().containsKey(resource))

代码示例来源:origin: com.github.veithen.cosmos/cosmos-equinox

boolean isFragment = Util.isFragment(resource);
if (!isFragment && rc.getWirings().containsKey(resource))

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.osgi

public Map<Resource, Resource> getHosts()
{
  Map<Resource, Resource> hosts = new HashMap<Resource, Resource>();
  for (Resource res : m_mandatoryResources)
  {
    if (res instanceof WrappedResource)
    {
      res = ((WrappedResource) res).getDeclaredResource();
    }
    if (!Util.isFragment(res))
    {
      hosts.put(res, getWrappedHost(res));
    }
  }
  for (Capability cap : m_dependentMap.keySet())
  {
    Resource res = cap.getResource();
    if (res instanceof WrappedResource)
    {
      res = ((WrappedResource) res).getDeclaredResource();
    }
    if (!Util.isFragment(res))
    {
      hosts.put(res, getWrappedHost(res));
    }
  }
  return hosts;
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.osgi

public Map<Resource, Resource> getHosts()
{
  Map<Resource, Resource> hosts = new HashMap<Resource, Resource>();
  for (Resource res : m_mandatoryResources)
  {
    if (res instanceof WrappedResource)
    {
      res = ((WrappedResource) res).getDeclaredResource();
    }
    if (!Util.isFragment(res))
    {
      hosts.put(res, getWrappedHost(res));
    }
  }
  for (Capability cap : m_dependentMap.keySet())
  {
    Resource res = cap.getResource();
    if (res instanceof WrappedResource)
    {
      res = ((WrappedResource) res).getDeclaredResource();
    }
    if (!Util.isFragment(res))
    {
      hosts.put(res, getWrappedHost(res));
    }
  }
  return hosts;
}

代码示例来源:origin: forge/roaster

private void addHost(Resource res, Map<Resource, Resource> hosts) {
  if (res instanceof WrappedResource)
  {
    res = ((WrappedResource) res).getDeclaredResource();
  }
  if (!Util.isFragment(res))
  {
    hosts.put(res, getWrappedHost(res));
  } else {
    Requirement hostReq = res.getRequirements(HostNamespace.HOST_NAMESPACE).get(0);
    Capability hostCap = getFirstCandidate(hostReq);
    // If the resource is an already resolved fragment and can not
    // be attached to new hosts, there will be no matching host,
    // so ignore this resource
    if (hostCap != null) {
      res = getWrappedHost(hostCap.getResource());
      if (res instanceof WrappedResource) {
        hosts.put(((WrappedResource) res).getDeclaredResource(), res);
      }
    }
  }
}

代码示例来源:origin: org.eclipse.tycho/org.eclipse.osgi

private void addHost(Resource res, Map<Resource, Resource> hosts) {
  if (res instanceof WrappedResource)
  {
    res = ((WrappedResource) res).getDeclaredResource();
  }
  if (!Util.isFragment(res))
  {
    hosts.put(res, getWrappedHost(res));
  } else {
    Requirement hostReq = res.getRequirements(HostNamespace.HOST_NAMESPACE).get(0);
    Capability hostCap = getFirstCandidate(hostReq);
    // If the resource is an already resolved fragment and can not
    // be attached to new hosts, there will be no matching host,
    // so ignore this resource
    if (hostCap != null) {
      res = getWrappedHost(hostCap.getResource());
      if (res instanceof WrappedResource) {
        hosts.put(((WrappedResource) res).getDeclaredResource(), res);
      }
    }
  }
}

代码示例来源:origin: apache/felix

private void addHost(Resource res, Map<Resource, Resource> hosts) {
  if (res instanceof WrappedResource)
  {
    res = ((WrappedResource) res).getDeclaredResource();
  }
  if (!Util.isFragment(res))
  {
    hosts.put(res, getWrappedHost(res));
  } else {
    Requirement hostReq = res.getRequirements(HostNamespace.HOST_NAMESPACE).get(0);
    Capability hostCap = getFirstCandidate(hostReq);
    // If the resource is an already resolved fragment and can not
    // be attached to new hosts, there will be no matching host,
    // so ignore this resource
    if (hostCap != null) {
      res = getWrappedHost(hostCap.getResource());
      if (res instanceof WrappedResource) {
        hosts.put(((WrappedResource) res).getDeclaredResource(), res);
      }
    }
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi

private void addHost(Resource res, Map<Resource, Resource> hosts) {
  if (res instanceof WrappedResource)
  {
    res = ((WrappedResource) res).getDeclaredResource();
  }
  if (!Util.isFragment(res))
  {
    hosts.put(res, getWrappedHost(res));
  } else {
    Requirement hostReq = res.getRequirements(HostNamespace.HOST_NAMESPACE).get(0);
    Capability hostCap = getFirstCandidate(hostReq);
    // If the resource is an already resolved fragment and can not
    // be attached to new hosts, there will be no matching host,
    // so ignore this resource
    if (hostCap != null) {
      res = getWrappedHost(hostCap.getResource());
      if (res instanceof WrappedResource) {
        hosts.put(((WrappedResource) res).getDeclaredResource(), res);
      }
    }
  }
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.resolve

private void addHost(Resource res, Map<Resource, Resource> hosts) {
  if (res instanceof WrappedResource)
  {
    res = ((WrappedResource) res).getDeclaredResource();
  }
  if (!Util.isFragment(res))
  {
    hosts.put(res, getWrappedHost(res));
  } else {
    Requirement hostReq = res.getRequirements(HostNamespace.HOST_NAMESPACE).get(0);
    Capability hostCap = getFirstCandidate(hostReq);
    // If the resource is an already resolved fragment and can not
    // be attached to new hosts, there will be no matching host,
    // so ignore this resource
    if (hostCap != null) {
      res = getWrappedHost(hostCap.getResource());
      if (res instanceof WrappedResource) {
        hosts.put(((WrappedResource) res).getDeclaredResource(), res);
      }
    }
  }
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

private void addHost(Resource res, Map<Resource, Resource> hosts) {
  if (res instanceof WrappedResource)
  {
    res = ((WrappedResource) res).getDeclaredResource();
  }
  if (!Util.isFragment(res))
  {
    hosts.put(res, getWrappedHost(res));
  } else {
    Requirement hostReq = res.getRequirements(HostNamespace.HOST_NAMESPACE).get(0);
    Capability hostCap = getFirstCandidate(hostReq);
    // If the resource is an already resolved fragment and can not
    // be attached to new hosts, there will be no matching host,
    // so ignore this resource
    if (hostCap != null) {
      res = getWrappedHost(hostCap.getResource());
      if (res instanceof WrappedResource) {
        hosts.put(((WrappedResource) res).getDeclaredResource(), res);
      }
    }
  }
}

代码示例来源:origin: forge/roaster

if (candidates.isEmpty() && !Util.isOptional(requirement))
 if (Util.isFragment(resource) && rc.getWirings().containsKey(resource))

代码示例来源:origin: org.eclipse.tycho/org.eclipse.osgi

if (candidates.isEmpty() && !Util.isOptional(requirement))
 if (Util.isFragment(resource) && rc.getWirings().containsKey(resource))

代码示例来源:origin: biz.aQute.bnd/biz.aQute.resolve

if (Util.isFragment(resource) || (session.getContext().getWirings().get(resource) == null))
if (Util.isFragment(resource) || (session.getContext().getWirings().get(resource) == null))

代码示例来源:origin: org.eclipse.tycho/org.eclipse.osgi

if (Util.isFragment(resource) || (session.getContext().getWirings().get(resource) == null))
if (Util.isFragment(resource) || (session.getContext().getWirings().get(resource) == null))

代码示例来源:origin: forge/roaster

if (Util.isFragment(resource) || (session.getContext().getWirings().get(resource) == null))
if (Util.isFragment(resource) || (session.getContext().getWirings().get(resource) == null))

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

if (Util.isFragment(resource) || (session.getContext().getWirings().get(resource) == null))
if (Util.isFragment(resource) || (session.getContext().getWirings().get(resource) == null))

代码示例来源:origin: apache/felix

if (Util.isFragment(resource) || (session.getContext().getWirings().get(resource) == null))
if (Util.isFragment(resource) || (session.getContext().getWirings().get(resource) == null))

代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi

if (Util.isFragment(resource) || (session.getContext().getWirings().get(resource) == null))
if (Util.isFragment(resource) || (session.getContext().getWirings().get(resource) == null))

相关文章