org.apache.felix.framework.wiring
Class BundleRequirementImpl

java.lang.Object
  extended by org.apache.felix.framework.wiring.BundleRequirementImpl
All Implemented Interfaces:
BundleRequirement
Direct Known Subclasses:
HostedRequirement

public class BundleRequirementImpl
extends java.lang.Object
implements BundleRequirement


Constructor Summary
BundleRequirementImpl(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)
           
BundleRequirementImpl(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, SimpleFilter filter)
           
 
Method Summary
 java.util.Map<java.lang.String,java.lang.Object> getAttributes()
          Returns the attributes of this requirement.
 java.util.Map<java.lang.String,java.lang.String> getDirectives()
          Returns the directives of this requirement.
 SimpleFilter getFilter()
           
 java.lang.String getNamespace()
          Returns the name space of this requirement.
 BundleRevision getRevision()
          Returns the bundle revision declaring this requirement.
 boolean isOptional()
           
 boolean matches(BundleCapability cap)
          Returns whether the specified capability matches this requirement.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BundleRequirementImpl

public BundleRequirementImpl(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,
                             SimpleFilter filter)

BundleRequirementImpl

public BundleRequirementImpl(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

getNamespace

public java.lang.String getNamespace()
Description copied from interface: BundleRequirement
Returns the name space of this requirement.

Specified by:
getNamespace in interface BundleRequirement
Returns:
The name space of this requirement.

getDirectives

public java.util.Map<java.lang.String,java.lang.String> getDirectives()
Description copied from interface: BundleRequirement
Returns the directives of this requirement.

Specified by:
getDirectives in interface BundleRequirement
Returns:
An unmodifiable map of directive names to directive values for this requirement, or an empty map if this requirement has no directives.

getAttributes

public java.util.Map<java.lang.String,java.lang.Object> getAttributes()
Description copied from interface: BundleRequirement
Returns the attributes of this requirement.

Specified by:
getAttributes in interface BundleRequirement
Returns:
An unmodifiable map of attribute names to attribute values for this requirement, or an empty map if this requirement has no attributes.

getRevision

public BundleRevision getRevision()
Description copied from interface: BundleRequirement
Returns the bundle revision declaring this requirement.

Specified by:
getRevision in interface BundleRequirement
Returns:
The bundle revision declaring this requirement.

matches

public boolean matches(BundleCapability cap)
Description copied from interface: BundleRequirement
Returns whether the specified capability matches this requirement.

Specified by:
matches in interface BundleRequirement
Parameters:
cap - The capability to match to this requirement.
Returns:
true if the specified capability has the same name space as this requirement and the filter for this requirement matches the attributes of the specified capability; false otherwise.

isOptional

public boolean isOptional()

getFilter

public SimpleFilter getFilter()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2012. All Rights Reserved.