Class BundleCapabilityImpl
- java.lang.Object
-
- org.apache.felix.framework.wiring.BundleCapabilityImpl
-
- All Implemented Interfaces:
BundleCapability
,Capability
- Direct Known Subclasses:
WrappedCapability
public class BundleCapabilityImpl extends java.lang.Object implements BundleCapability
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
VERSION_ATTR
-
Constructor Summary
Constructors Constructor Description BundleCapabilityImpl(BundleRevision revision, java.lang.String namespace, java.util.Map<java.lang.String,java.lang.String> dirs, java.util.Map<java.lang.String,java.lang.Object> attrs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>
getAttributes()
Returns the attributes of this capability.java.util.Map<java.lang.String,java.lang.String>
getDirectives()
Returns the directives of this capability.java.lang.String
getNamespace()
Returns the namespace of this capability.BundleRevision
getResource()
Returns the resource declaring this capability.BundleRevision
getRevision()
Returns the bundle revision declaring this capability.java.util.List<java.lang.String>
getUses()
boolean
isAttributeMandatory(java.lang.String name)
boolean
isIncluded(java.lang.String name)
java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.osgi.resource.Capability
equals, hashCode
-
-
-
-
Field Detail
-
VERSION_ATTR
public static final java.lang.String VERSION_ATTR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BundleCapabilityImpl
public BundleCapabilityImpl(BundleRevision revision, java.lang.String namespace, java.util.Map<java.lang.String,java.lang.String> dirs, java.util.Map<java.lang.String,java.lang.Object> attrs)
-
-
Method Detail
-
getResource
public BundleRevision getResource()
Description copied from interface:BundleCapability
Returns the resource declaring this capability.This method returns the same value as
BundleCapability.getRevision()
.- Specified by:
getResource
in interfaceBundleCapability
- Specified by:
getResource
in interfaceCapability
- Returns:
- The resource declaring this capability.
-
getRevision
public BundleRevision getRevision()
Description copied from interface:BundleCapability
Returns the bundle revision declaring this capability.- Specified by:
getRevision
in interfaceBundleCapability
- Returns:
- The bundle revision declaring this capability.
-
getNamespace
public java.lang.String getNamespace()
Description copied from interface:BundleCapability
Returns the namespace of this capability.- Specified by:
getNamespace
in interfaceBundleCapability
- Specified by:
getNamespace
in interfaceCapability
- Returns:
- The namespace of this capability.
-
getDirectives
public java.util.Map<java.lang.String,java.lang.String> getDirectives()
Description copied from interface:BundleCapability
Returns the directives of this capability.All capability directives not specified by the
wiring namespaces
have no specified semantics and are considered extra user defined information.- Specified by:
getDirectives
in interfaceBundleCapability
- Specified by:
getDirectives
in interfaceCapability
- Returns:
- An unmodifiable map of directive names to directive values for this capability, or an empty map if this capability has no directives.
-
getAttributes
public java.util.Map<java.lang.String,java.lang.Object> getAttributes()
Description copied from interface:BundleCapability
Returns the attributes of this capability.- Specified by:
getAttributes
in interfaceBundleCapability
- Specified by:
getAttributes
in interfaceCapability
- Returns:
- An unmodifiable map of attribute names to attribute values for this capability, or an empty map if this capability has no attributes.
-
isAttributeMandatory
public boolean isAttributeMandatory(java.lang.String name)
-
getUses
public java.util.List<java.lang.String> getUses()
-
isIncluded
public boolean isIncluded(java.lang.String name)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-