org.apache.felix.framework.wiring
Class BundleCapabilityImpl

java.lang.Object
  extended by org.apache.felix.framework.wiring.BundleCapabilityImpl
All Implemented Interfaces:
BundleCapability, Capability
Direct Known Subclasses:
WrappedCapability

public class BundleCapabilityImpl
extends Object
implements BundleCapability


Field Summary
static String VERSION_ATTR
           
 
Constructor Summary
BundleCapabilityImpl(BundleRevision revision, String namespace, Map<String,String> dirs, Map<String,Object> attrs)
           
 
Method Summary
 Map<String,Object> getAttributes()
          Returns the attributes of this capability.
 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()
           
 boolean isAttributeMandatory(String name)
           
 boolean isIncluded(String name)
           
 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 String VERSION_ATTR
See Also:
Constant Field Values
Constructor Detail

BundleCapabilityImpl

public BundleCapabilityImpl(BundleRevision revision,
                            String namespace,
                            Map<String,String> dirs,
                            Map<String,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 interface BundleCapability
Specified by:
getResource in interface Capability
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 BundleCapability
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
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
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
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(String name)

getUses

public List<String> getUses()

isIncluded

public boolean isIncluded(String name)

toString

public String toString()
Overrides:
toString in class Object


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