Package org.apache.felix.utils.resource
Class CapabilitySet
java.lang.Object
org.apache.felix.utils.resource.CapabilitySet
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCapability(org.osgi.resource.Capability cap) private static ObjectcoerceType(Object lhs, String rhsString) private static booleanprivate static booleancompareApproximate(Object lhs, Object rhs) convertArrayToList(Object array) This is an ugly utility method to convert an array of primitives to an array of primitive wrapper objects.private voiddeindexCapability(Map<Object, Set<org.osgi.resource.Capability>> index, org.osgi.resource.Capability cap, Object value) voiddump()private voidindexCapability(Map<Object, Set<org.osgi.resource.Capability>> index, org.osgi.resource.Capability cap, Object capValue) private Set<org.osgi.resource.Capability> match(Set<org.osgi.resource.Capability> caps, SimpleFilter sf) Set<org.osgi.resource.Capability> match(SimpleFilter sf, boolean obeyMandatory) static booleanmatches(org.osgi.resource.Capability cap, SimpleFilter sf) static booleanmatches(org.osgi.resource.Capability capability, org.osgi.resource.Requirement requirement) private static booleanmatchesInternal(org.osgi.resource.Capability cap, SimpleFilter sf) private static Set<org.osgi.resource.Capability> matchMandatory(Set<org.osgi.resource.Capability> caps, SimpleFilter sf) private static booleanmatchMandatory(org.osgi.resource.Capability cap, SimpleFilter sf) private static booleanmatchMandatoryAttribute(String attrName, SimpleFilter sf) voidremoveCapability(org.osgi.resource.Capability cap) private static String
-
Field Details
-
STRING_CLASS
-
indices
-
capSet
-
-
Constructor Details
-
CapabilitySet
-
-
Method Details
-
dump
public void dump() -
addCapability
public void addCapability(org.osgi.resource.Capability cap) -
indexCapability
-
removeCapability
public void removeCapability(org.osgi.resource.Capability cap) -
deindexCapability
-
match
-
match
private Set<org.osgi.resource.Capability> match(Set<org.osgi.resource.Capability> caps, SimpleFilter sf) -
matches
public static boolean matches(org.osgi.resource.Capability capability, org.osgi.resource.Requirement requirement) -
matches
-
matchesInternal
-
matchMandatory
private static Set<org.osgi.resource.Capability> matchMandatory(Set<org.osgi.resource.Capability> caps, SimpleFilter sf) -
matchMandatory
-
matchMandatoryAttribute
-
compare
-
compareApproximate
-
removeWhitespace
-
coerceType
- Throws:
Exception
-
convertArrayToList
This is an ugly utility method to convert an array of primitives to an array of primitive wrapper objects. This method simplifies processing LDAP filters since the special case of primitive arrays can be ignored.- Parameters:
array- An array of primitive types.- Returns:
- An corresponding array using pritive wrapper objects.
-