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
-
-
Field Summary
Fields Modifier and Type Field Description private BundleRevisionm_hostprivate BundleRequirementImplm_req
-
Constructor Summary
Constructors Constructor Description WrappedRequirement(BundleRevision host, BundleRequirementImpl req)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Compares thisRequirementto 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.SimpleFiltergetFilter()java.lang.StringgetNamespace()Returns the namespace of this requirement.BundleRequirementImplgetOriginalRequirement()BundleRevisiongetRevision()Returns the bundle revision declaring this requirement.inthashCode()Returns the hashCode of thisRequirement.booleanisOptional()java.lang.StringtoString()-
Methods inherited from class org.apache.felix.framework.wiring.BundleRequirementImpl
getResource, matches
-
-
-
-
Field Detail
-
m_host
private final BundleRevision m_host
-
m_req
private final BundleRequirementImpl m_req
-
-
Constructor Detail
-
WrappedRequirement
public WrappedRequirement(BundleRevision host, BundleRequirementImpl req)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
Description copied from interface:RequirementCompares thisRequirementto anotherRequirement.This
Requirementis equal to anotherRequirementif they have the same namespace, directives and attributes and are declared by the same resource.- Specified by:
equalsin interfaceRequirement- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- The object to compare against thisRequirement.- Returns:
trueif thisRequirementis equal to the other object;falseotherwise.
-
hashCode
public int hashCode()
Description copied from interface:RequirementReturns the hashCode of thisRequirement.- Specified by:
hashCodein interfaceRequirement- Overrides:
hashCodein classjava.lang.Object- Returns:
- The hashCode of this
Requirement.
-
getOriginalRequirement
public BundleRequirementImpl getOriginalRequirement()
-
getRevision
public BundleRevision getRevision()
Description copied from interface:BundleRequirementReturns the bundle revision declaring this requirement.- Specified by:
getRevisionin interfaceBundleRequirement- Overrides:
getRevisionin classBundleRequirementImpl- Returns:
- The bundle revision declaring this requirement.
-
getNamespace
public java.lang.String getNamespace()
Description copied from interface:BundleRequirementReturns the namespace of this requirement.- Specified by:
getNamespacein interfaceBundleRequirement- Specified by:
getNamespacein interfaceRequirement- Overrides:
getNamespacein classBundleRequirementImpl- Returns:
- The namespace of this requirement.
-
getFilter
public SimpleFilter getFilter()
- Overrides:
getFilterin classBundleRequirementImpl
-
isOptional
public boolean isOptional()
- Overrides:
isOptionalin classBundleRequirementImpl
-
getDirectives
public java.util.Map<java.lang.String,java.lang.String> getDirectives()
Description copied from interface:BundleRequirementReturns the directives of this requirement.All requirement directives not specified by the
wiring namespaceshave no specified semantics and are considered extra user defined information.- Specified by:
getDirectivesin interfaceBundleRequirement- Specified by:
getDirectivesin interfaceRequirement- Overrides:
getDirectivesin 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:BundleRequirementReturns the attributes of this requirement.Requirement attributes have no specified semantics and are considered extra user defined information.
- Specified by:
getAttributesin interfaceBundleRequirement- Specified by:
getAttributesin interfaceRequirement- Overrides:
getAttributesin 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:
toStringin classBundleRequirementImpl
-
-