本文整理了Java中org.apache.felix.resolver.Util.isMultiple()
方法的一些代码示例,展示了Util.isMultiple()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.isMultiple()
方法的具体详情如下:
包路径:org.apache.felix.resolver.Util
类名称:Util
方法名:isMultiple
暂无
代码示例来源:origin: apache/felix
private boolean permuteUsedBlameRequirement(Requirement req, Set<Requirement> mutated, Candidates permutation)
{
// Sanity check for multiple.
if (Util.isMultiple(req))
{
return false;
}
// If we've already permutated this requirement in another
// uses constraint, don't permutate it again just continue
// with the next uses constraint.
if (mutated.contains(req))
{
return true;
}
// See if we can permutate the candidates for blamed
// requirement; there may be no candidates if the resource
// associated with the requirement is already resolved.
if (permutation.canRemoveCandidate(req))
{
permutation.removeFirstCandidate(req);
mutated.add(req);
return true;
}
return false;
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.osgi
public void permutate(Requirement req, List<Candidates> permutations)
{
if (!Util.isMultiple(req) && canRemoveCandidate(req))
{
Candidates perm = copy();
perm.removeFirstCandidate(req);
permutations.add(perm);
}
}
代码示例来源:origin: forge/roaster
private boolean permuteUsedBlameRequirement(Requirement req, Set<Requirement> mutated, Candidates permutation)
{
// Sanity check for multiple.
if (Util.isMultiple(req))
{
return false;
}
// If we've already permutated this requirement in another
// uses constraint, don't permutate it again just continue
// with the next uses constraint.
if (mutated.contains(req))
{
return true;
}
// See if we can permutate the candidates for blamed
// requirement; there may be no candidates if the resource
// associated with the requirement is already resolved.
if (permutation.canRemoveCandidate(req))
{
permutation.removeFirstCandidate(req);
mutated.add(req);
return true;
}
return false;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi
private boolean permuteUsedBlameRequirement(Requirement req, Set<Requirement> mutated, Candidates permutation)
{
// Sanity check for multiple.
if (Util.isMultiple(req))
{
return false;
}
// If we've already permutated this requirement in another
// uses constraint, don't permutate it again just continue
// with the next uses constraint.
if (mutated.contains(req))
{
return true;
}
// See if we can permutate the candidates for blamed
// requirement; there may be no candidates if the resource
// associated with the requirement is already resolved.
if (permutation.canRemoveCandidate(req))
{
permutation.removeFirstCandidate(req);
mutated.add(req);
return true;
}
return false;
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
private boolean permuteUsedBlameRequirement(Requirement req, Set<Requirement> mutated, Candidates permutation)
{
// Sanity check for multiple.
if (Util.isMultiple(req))
{
return false;
}
// If we've already permutated this requirement in another
// uses constraint, don't permutate it again just continue
// with the next uses constraint.
if (mutated.contains(req))
{
return true;
}
// See if we can permutate the candidates for blamed
// requirement; there may be no candidates if the resource
// associated with the requirement is already resolved.
if (permutation.canRemoveCandidate(req))
{
permutation.removeFirstCandidate(req);
mutated.add(req);
return true;
}
return false;
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.resolve
private boolean permuteUsedBlameRequirement(Requirement req, Set<Requirement> mutated, Candidates permutation)
{
// Sanity check for multiple.
if (Util.isMultiple(req))
{
return false;
}
// If we've already permutated this requirement in another
// uses constraint, don't permutate it again just continue
// with the next uses constraint.
if (mutated.contains(req))
{
return true;
}
// See if we can permutate the candidates for blamed
// requirement; there may be no candidates if the resource
// associated with the requirement is already resolved.
if (permutation.canRemoveCandidate(req))
{
permutation.removeFirstCandidate(req);
mutated.add(req);
return true;
}
return false;
}
代码示例来源:origin: com.github.veithen.cosmos/cosmos-equinox
public void permutate(Requirement req, List<Candidates> permutations)
{
if (!Util.isMultiple(req) && canRemoveCandidate(req))
{
Candidates perm = copy();
perm.removeFirstCandidate(req);
permutations.add(perm);
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.osgi
public void permutate(Requirement req, List<Candidates> permutations)
{
if (!Util.isMultiple(req) && canRemoveCandidate(req))
{
Candidates perm = copy();
perm.removeFirstCandidate(req);
permutations.add(perm);
}
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.osgi
private boolean permuteUsedBlameRequirement(Requirement req, Set<Requirement> mutated, Candidates permutation)
{
// Sanity check for multiple.
if (Util.isMultiple(req))
{
return false;
}
// If we've already permutated this requirement in another
// uses constraint, don't permutate it again just continue
// with the next uses constraint.
if (mutated.contains(req))
{
return true;
}
// See if we can permutate the candidates for blamed
// requirement; there may be no candidates if the resource
// associated with the requirement is already resolved.
if (permutation.canRemoveCandidate(req))
{
permutation.removeFirstCandidate(req);
mutated.add(req);
return true;
}
return false;
}
代码示例来源:origin: forge/roaster
public Candidates permutate(Requirement req)
{
if (!Util.isMultiple(req) && canRemoveCandidate(req))
{
Candidates perm = copy();
perm.removeFirstCandidate(req);
return perm;
}
return null;
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.osgi
public Candidates permutate(Requirement req)
{
if (!Util.isMultiple(req) && canRemoveCandidate(req))
{
Candidates perm = copy();
perm.removeFirstCandidate(req);
return perm;
}
return null;
}
代码示例来源:origin: apache/felix
public Candidates permutate(Requirement req)
{
if (!Util.isMultiple(req) && canRemoveCandidate(req))
{
Candidates perm = copy();
perm.removeFirstCandidate(req);
return perm;
}
return null;
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
public Candidates permutate(Requirement req)
{
if (!Util.isMultiple(req) && canRemoveCandidate(req))
{
Candidates perm = copy();
perm.removeFirstCandidate(req);
return perm;
}
return null;
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.resolve
public Candidates permutate(Requirement req)
{
if (!Util.isMultiple(req) && canRemoveCandidate(req))
{
Candidates perm = copy();
perm.removeFirstCandidate(req);
return perm;
}
return null;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi
public Candidates permutate(Requirement req)
{
if (!Util.isMultiple(req) && canRemoveCandidate(req))
{
Candidates perm = copy();
perm.removeFirstCandidate(req);
return perm;
}
return null;
}
代码示例来源: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: forge/roaster
boolean checkMultiple(
UsedBlames usedBlames,
Blame usedBlame,
Candidates permutation)
{
// Check the root requirement to see if it is a multiple cardinality
// requirement.
CandidateSelector candidates = null;
Requirement req = usedBlame.m_reqs.get(0);
if (Util.isMultiple(req))
{
// Create a copy of the current permutation so we can remove the
// candidates causing the blame.
if (m_multipleCardCandidates == null)
{
m_multipleCardCandidates = permutation.copy();
}
// Get the current candidate list and remove all the offending root
// cause candidates from a copy of the current permutation.
candidates = m_multipleCardCandidates.clearMultipleCardinalityCandidates(req, usedBlames.getRootCauses(req));
}
// We only are successful if there is at least one candidate left
// for the requirement
return (candidates != null) && !candidates.isEmpty();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi
boolean checkMultiple(
UsedBlames usedBlames,
Blame usedBlame,
Candidates permutation)
{
// Check the root requirement to see if it is a multiple cardinality
// requirement.
CandidateSelector candidates = null;
Requirement req = usedBlame.m_reqs.get(0);
if (Util.isMultiple(req))
{
// Create a copy of the current permutation so we can remove the
// candidates causing the blame.
if (m_multipleCardCandidates == null)
{
m_multipleCardCandidates = permutation.copy();
}
// Get the current candidate list and remove all the offending root
// cause candidates from a copy of the current permutation.
candidates = m_multipleCardCandidates.clearMultipleCardinalityCandidates(req, usedBlames.getRootCauses(req));
}
// We only are successful if there is at least one candidate left
// for the requirement
return (candidates != null) && !candidates.isEmpty();
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.resolve
boolean checkMultiple(
UsedBlames usedBlames,
Blame usedBlame,
Candidates permutation)
{
// Check the root requirement to see if it is a multiple cardinality
// requirement.
CandidateSelector candidates = null;
Requirement req = usedBlame.m_reqs.get(0);
if (Util.isMultiple(req))
{
// Create a copy of the current permutation so we can remove the
// candidates causing the blame.
if (m_multipleCardCandidates == null)
{
m_multipleCardCandidates = permutation.copy();
}
// Get the current candidate list and remove all the offending root
// cause candidates from a copy of the current permutation.
candidates = m_multipleCardCandidates.clearMultipleCardinalityCandidates(req, usedBlames.getRootCauses(req));
}
// We only are successful if there is at least one candidate left
// for the requirement
return (candidates != null) && !candidates.isEmpty();
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.osgi
private boolean checkMultiple(
ResolveSession session,
UsedBlames usedBlames,
Blame usedBlame,
Candidates permutation)
{
// Check the root requirement to see if it is a multiple cardinality
// requirement.
List<Capability> candidates = null;
Requirement req = usedBlame.m_reqs.get(0);
if (Util.isMultiple(req))
{
// Create a copy of the current permutation so we can remove the
// candidates causing the blame.
if (session.getMultipleCardCandidates() == null)
{
session.setMultipleCardCandidates(permutation.copy());
}
// Get the current candidate list and remove all the offending root
// cause candidates from a copy of the current permutation.
candidates = session.getMultipleCardCandidates().clearCandidates(req, usedBlames.getRootCauses(req));
}
// We only are successful if there is at least one candidate left
// for the requirement
return (candidates != null) && !candidates.isEmpty();
}
内容来源于网络,如有侵权,请联系作者删除!