org.apache.felix.framework.resolver
Class WrappedRequirement

java.lang.Object
  extended by org.apache.felix.framework.wiring.BundleRequirementImpl
      extended by org.apache.felix.framework.resolver.WrappedRequirement
All Implemented Interfaces:
BundleRequirement, Requirement

public class WrappedRequirement
extends BundleRequirementImpl


Constructor Summary
WrappedRequirement(BundleRevision host, BundleRequirementImpl req)
           
 
Method Summary
 boolean equals(Object obj)
          Compares this Requirement to another Requirement.
 Map<String,Object> getAttributes()
          Returns the attributes of this requirement.
 Map<String,String> getDirectives()
          Returns the directives of this requirement.
 SimpleFilter getFilter()
           
 String getNamespace()
          Returns the namespace of this requirement.
 BundleRequirementImpl getOriginalRequirement()
           
 BundleRevision getRevision()
          Returns the bundle revision declaring this requirement.
 int hashCode()
          Returns the hashCode of this Requirement.
 boolean isOptional()
           
 String toString()
           
 
Methods inherited from class org.apache.felix.framework.wiring.BundleRequirementImpl
getResource, matches
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WrappedRequirement

public WrappedRequirement(BundleRevision host,
                          BundleRequirementImpl req)
Method Detail

equals

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

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

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

hashCode

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

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

getOriginalRequirement

public BundleRequirementImpl getOriginalRequirement()

getRevision

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

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

getNamespace

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

Specified by:
getNamespace in interface BundleRequirement
Specified by:
getNamespace in interface Requirement
Overrides:
getNamespace in class BundleRequirementImpl
Returns:
The namespace of this requirement.

getFilter

public SimpleFilter getFilter()
Overrides:
getFilter in class BundleRequirementImpl

isOptional

public boolean isOptional()
Overrides:
isOptional in class BundleRequirementImpl

getDirectives

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

All requirement directives not specified by the wiring namespaces have no specified semantics and are considered extra user defined information.

Specified by:
getDirectives in interface BundleRequirement
Specified by:
getDirectives in interface Requirement
Overrides:
getDirectives in class BundleRequirementImpl
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 Map<String,Object> getAttributes()
Description copied from interface: BundleRequirement
Returns the attributes of this requirement.

Requirement attributes have no specified semantics and are considered extra user defined information.

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

toString

public String toString()
Overrides:
toString in class BundleRequirementImpl


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