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

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

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

Util.isOptional介绍

暂无

代码示例

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

public boolean canRemoveCandidate(Requirement req)
{
  List<Capability> candidates = m_candidateMap.get(req);
  return ((candidates != null) && (candidates.size() > 1 || Util.isOptional(req)));
}

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

public boolean canRemoveCandidate(Requirement req)
{
  List<Capability> candidates = m_candidateMap.get(req);
  return ((candidates != null) && (candidates.size() > 1 || Util.isOptional(req)));
}

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

public boolean canRemoveCandidate(Requirement req)
{
  List<Capability> candidates = m_candidateMap.get(req);
  return ((candidates != null) && (candidates.size() > 1 || Util.isOptional(req)));
}

代码示例来源: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.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: org.eclipse/osgi

if (!Util.isOptional(r))

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

private static void permutate(
  Candidates allCandidates, Requirement req, List<Candidates> permutations)
{
  if (!Util.isMultiple(req))
  {
    List<Capability> candidates = allCandidates.getCandidates(req);
    if ((candidates != null) && (candidates.size() > 1 || Util.isOptional(req)))
    {
      Candidates perm = allCandidates.copy();
      candidates = perm.getCandidates(req);
      candidates.remove(0);
      if (candidates.isEmpty())
      {
        perm.clearCandidates(req);
      }
      permutations.add(perm);
    }
  }
}

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

if (!Util.isOptional(r))

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

if (!Util.isOptional(r))

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

if (!Util.isOptional(r))

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

if (!Util.isOptional(r))

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

if (!Util.isOptional(r))

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

if (!Util.isOptional(r))

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

if (!Util.isOptional(r))

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

if (!Util.isOptional(r))

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

if (!Util.isOptional(r))

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

return candidates.getRemainingCandidateCount() > 1 || Util.isOptional(req);

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

return candidates.getRemainingCandidateCount() > 1 || Util.isOptional(req);

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

return candidates.getRemainingCandidateCount() > 1 || Util.isOptional(req);

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

return candidates.getRemainingCandidateCount() > 1 || Util.isOptional(req);

相关文章