Class WrappedCapability
- java.lang.Object
-
- org.apache.felix.framework.wiring.BundleCapabilityImpl
-
- org.apache.felix.framework.resolver.WrappedCapability
-
- All Implemented Interfaces:
HostedCapability
,BundleCapability
,Capability
public class WrappedCapability extends BundleCapabilityImpl implements HostedCapability
-
-
Field Summary
-
Fields inherited from class org.apache.felix.framework.wiring.BundleCapabilityImpl
VERSION_ATTR
-
-
Constructor Summary
Constructors Constructor Description WrappedCapability(BundleRevision host, BundleCapabilityImpl cap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Compares thisCapability
to anotherCapability
.java.util.Map<java.lang.String,java.lang.Object>
getAttributes()
Returns the attributes of this capability.BundleCapability
getDeclaredCapability()
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()
int
hashCode()
Returns the hashCode of thisCapability
.java.lang.String
toString()
-
Methods inherited from class org.apache.felix.framework.wiring.BundleCapabilityImpl
isAttributeMandatory, isIncluded
-
-
-
-
Constructor Detail
-
WrappedCapability
public WrappedCapability(BundleRevision host, BundleCapabilityImpl cap)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
Description copied from interface:Capability
Compares thisCapability
to anotherCapability
.This
Capability
is equal to anotherCapability
if they have the same namespace, directives and attributes and are declared by the same resource.- Specified by:
equals
in interfaceCapability
- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- The object to compare against thisCapability
.- Returns:
true
if thisCapability
is equal to the other object;false
otherwise.
-
hashCode
public int hashCode()
Description copied from interface:Capability
Returns the hashCode of thisCapability
.- Specified by:
hashCode
in interfaceCapability
- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- The hashCode of this
Capability
.
-
getDeclaredCapability
public BundleCapability getDeclaredCapability()
- Specified by:
getDeclaredCapability
in interfaceHostedCapability
-
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
- Overrides:
getResource
in classBundleCapabilityImpl
- 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
- Specified by:
getRevision
in interfaceHostedCapability
- Overrides:
getRevision
in classBundleCapabilityImpl
- 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
- Overrides:
getNamespace
in classBundleCapabilityImpl
- 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
- Overrides:
getDirectives
in classBundleCapabilityImpl
- 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
- Overrides:
getAttributes
in classBundleCapabilityImpl
- Returns:
- An unmodifiable map of attribute names to attribute values for this capability, or an empty map if this capability has no attributes.
-
getUses
public java.util.List<java.lang.String> getUses()
- Overrides:
getUses
in classBundleCapabilityImpl
-
toString
public java.lang.String toString()
- Overrides:
toString
in classBundleCapabilityImpl
-
-