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 Modifier and Type Field Description private BundleCapabilityImplm_capprivate BundleRevisionm_host-
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 booleanequals(java.lang.Object obj)Compares thisCapabilityto anotherCapability.java.util.Map<java.lang.String,java.lang.Object>getAttributes()Returns the attributes of this capability.BundleCapabilitygetDeclaredCapability()java.util.Map<java.lang.String,java.lang.String>getDirectives()Returns the directives of this capability.java.lang.StringgetNamespace()Returns the namespace of this capability.BundleRevisiongetResource()Returns the resource declaring this capability.BundleRevisiongetRevision()Returns the bundle revision declaring this capability.java.util.List<java.lang.String>getUses()inthashCode()Returns the hashCode of thisCapability.java.lang.StringtoString()-
Methods inherited from class org.apache.felix.framework.wiring.BundleCapabilityImpl
isAttributeMandatory, isIncluded
-
-
-
-
Field Detail
-
m_host
private final BundleRevision m_host
-
m_cap
private final BundleCapabilityImpl m_cap
-
-
Constructor Detail
-
WrappedCapability
public WrappedCapability(BundleRevision host, BundleCapabilityImpl cap)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
Description copied from interface:CapabilityCompares thisCapabilityto anotherCapability.This
Capabilityis equal to anotherCapabilityif they have the same namespace, directives and attributes and are declared by the same resource.- Specified by:
equalsin interfaceCapability- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- The object to compare against thisCapability.- Returns:
trueif thisCapabilityis equal to the other object;falseotherwise.
-
hashCode
public int hashCode()
Description copied from interface:CapabilityReturns the hashCode of thisCapability.- Specified by:
hashCodein interfaceCapability- Overrides:
hashCodein classjava.lang.Object- Returns:
- The hashCode of this
Capability.
-
getDeclaredCapability
public BundleCapability getDeclaredCapability()
- Specified by:
getDeclaredCapabilityin interfaceHostedCapability
-
getResource
public BundleRevision getResource()
Description copied from interface:BundleCapabilityReturns the resource declaring this capability.This method returns the same value as
BundleCapability.getRevision().- Specified by:
getResourcein interfaceBundleCapability- Specified by:
getResourcein interfaceCapability- Overrides:
getResourcein classBundleCapabilityImpl- Returns:
- The resource declaring this capability.
-
getRevision
public BundleRevision getRevision()
Description copied from interface:BundleCapabilityReturns the bundle revision declaring this capability.- Specified by:
getRevisionin interfaceBundleCapability- Specified by:
getRevisionin interfaceHostedCapability- Overrides:
getRevisionin classBundleCapabilityImpl- Returns:
- The bundle revision declaring this capability.
-
getNamespace
public java.lang.String getNamespace()
Description copied from interface:BundleCapabilityReturns the namespace of this capability.- Specified by:
getNamespacein interfaceBundleCapability- Specified by:
getNamespacein interfaceCapability- Overrides:
getNamespacein classBundleCapabilityImpl- Returns:
- The namespace of this capability.
-
getDirectives
public java.util.Map<java.lang.String,java.lang.String> getDirectives()
Description copied from interface:BundleCapabilityReturns the directives of this capability.All capability directives not specified by the
wiring namespaceshave no specified semantics and are considered extra user defined information.- Specified by:
getDirectivesin interfaceBundleCapability- Specified by:
getDirectivesin interfaceCapability- Overrides:
getDirectivesin 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:BundleCapabilityReturns the attributes of this capability.- Specified by:
getAttributesin interfaceBundleCapability- Specified by:
getAttributesin interfaceCapability- Overrides:
getAttributesin 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:
getUsesin classBundleCapabilityImpl
-
toString
public java.lang.String toString()
- Overrides:
toStringin classBundleCapabilityImpl
-
-