Class WrappedRequirement
- java.lang.Object
-
- org.apache.felix.framework.wiring.BundleRequirementImpl
-
- org.apache.felix.framework.resolver.WrappedRequirement
-
- All Implemented Interfaces:
BundleRequirement
,Requirement
public class WrappedRequirement extends BundleRequirementImpl
-
-
Constructor Summary
Constructors Constructor Description WrappedRequirement(BundleRevision host, BundleRequirementImpl req)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Compares thisRequirement
to anotherRequirement
.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 namespace of this requirement.BundleRequirementImpl
getOriginalRequirement()
BundleRevision
getRevision()
Returns the bundle revision declaring this requirement.int
hashCode()
Returns the hashCode of thisRequirement
.boolean
isOptional()
java.lang.String
toString()
-
Methods inherited from class org.apache.felix.framework.wiring.BundleRequirementImpl
getResource, matches
-
-
-
-
Constructor Detail
-
WrappedRequirement
public WrappedRequirement(BundleRevision host, BundleRequirementImpl req)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
Description copied from interface:Requirement
Compares thisRequirement
to anotherRequirement
.This
Requirement
is equal to anotherRequirement
if they have the same namespace, directives and attributes and are declared by the same resource.- Specified by:
equals
in interfaceRequirement
- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- The object to compare against thisRequirement
.- Returns:
true
if thisRequirement
is equal to the other object;false
otherwise.
-
hashCode
public int hashCode()
Description copied from interface:Requirement
Returns the hashCode of thisRequirement
.- Specified by:
hashCode
in interfaceRequirement
- Overrides:
hashCode
in classjava.lang.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 interfaceBundleRequirement
- Overrides:
getRevision
in classBundleRequirementImpl
- Returns:
- The bundle revision declaring this requirement.
-
getNamespace
public java.lang.String getNamespace()
Description copied from interface:BundleRequirement
Returns the namespace of this requirement.- Specified by:
getNamespace
in interfaceBundleRequirement
- Specified by:
getNamespace
in interfaceRequirement
- Overrides:
getNamespace
in classBundleRequirementImpl
- Returns:
- The namespace of this requirement.
-
getFilter
public SimpleFilter getFilter()
- Overrides:
getFilter
in classBundleRequirementImpl
-
isOptional
public boolean isOptional()
- Overrides:
isOptional
in classBundleRequirementImpl
-
getDirectives
public java.util.Map<java.lang.String,java.lang.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 interfaceBundleRequirement
- Specified by:
getDirectives
in interfaceRequirement
- Overrides:
getDirectives
in classBundleRequirementImpl
- 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.Requirement attributes have no specified semantics and are considered extra user defined information.
- Specified by:
getAttributes
in interfaceBundleRequirement
- Specified by:
getAttributes
in interfaceRequirement
- Overrides:
getAttributes
in classBundleRequirementImpl
- 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 java.lang.String toString()
- Overrides:
toString
in classBundleRequirementImpl
-
-