org.apache.felix.framework.resolver
Class WrappedCapability

java.lang.Object
  extended by org.apache.felix.framework.wiring.BundleCapabilityImpl
      extended by 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
WrappedCapability(BundleRevision host, BundleCapabilityImpl cap)
           
 
Method Summary
 boolean equals(Object obj)
          Compares this Capability to another Capability.
 Map<String,Object> getAttributes()
          Returns the attributes of this capability.
 BundleCapability getDeclaredCapability()
           
 Map<String,String> getDirectives()
          Returns the directives of this capability.
 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.
 List<String> getUses()
           
 int hashCode()
          Returns the hashCode of this Capability.
 String toString()
           
 
Methods inherited from class org.apache.felix.framework.wiring.BundleCapabilityImpl
isAttributeMandatory, isIncluded
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WrappedCapability

public WrappedCapability(BundleRevision host,
                         BundleCapabilityImpl cap)
Method Detail

equals

public boolean equals(Object obj)
Description copied from interface: Capability
Compares this Capability to another Capability.

This Capability is equal to another Capability if they have the same namespace, directives and attributes and are declared by the same resource.

Specified by:
equals in interface Capability
Overrides:
equals in class Object
Parameters:
obj - The object to compare against this Capability.
Returns:
true if this Capability is equal to the other object; false otherwise.

hashCode

public int hashCode()
Description copied from interface: Capability
Returns the hashCode of this Capability.

Specified by:
hashCode in interface Capability
Overrides:
hashCode in class Object
Returns:
The hashCode of this Capability.

getDeclaredCapability

public BundleCapability getDeclaredCapability()
Specified by:
getDeclaredCapability in interface HostedCapability

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 interface BundleCapability
Specified by:
getResource in interface Capability
Overrides:
getResource in class BundleCapabilityImpl
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 interface HostedCapability
Specified by:
getRevision in interface BundleCapability
Overrides:
getRevision in class BundleCapabilityImpl
Returns:
The bundle revision declaring this capability.

getNamespace

public String getNamespace()
Description copied from interface: BundleCapability
Returns the namespace of this capability.

Specified by:
getNamespace in interface BundleCapability
Specified by:
getNamespace in interface Capability
Overrides:
getNamespace in class BundleCapabilityImpl
Returns:
The namespace of this capability.

getDirectives

public Map<String,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 interface BundleCapability
Specified by:
getDirectives in interface Capability
Overrides:
getDirectives in class BundleCapabilityImpl
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 Map<String,Object> getAttributes()
Description copied from interface: BundleCapability
Returns the attributes of this capability.

Specified by:
getAttributes in interface BundleCapability
Specified by:
getAttributes in interface Capability
Overrides:
getAttributes in class BundleCapabilityImpl
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 List<String> getUses()
Overrides:
getUses in class BundleCapabilityImpl

toString

public String toString()
Overrides:
toString in class BundleCapabilityImpl


Copyright © 2007-2012 FuseSource, Corp.. All Rights Reserved.