public class BundleRequirementImpl extends Object implements BundleRequirement
| Constructor and Description |
|---|
BundleRequirementImpl(BundleRevision revision,
String namespace,
Map<String,String> dirs,
Map<String,Object> attrs) |
BundleRequirementImpl(BundleRevision revision,
String namespace,
Map<String,String> dirs,
Map<String,Object> attrs,
SimpleFilter filter) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
BundleRevision |
getResource()
Returns the resource declaring 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.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitequals, hashCodepublic BundleRequirementImpl(BundleRevision revision, String namespace, Map<String,String> dirs, Map<String,Object> attrs, SimpleFilter filter)
public String getNamespace()
BundleRequirementgetNamespace in interface BundleRequirementgetNamespace in interface Requirementpublic Map<String,String> getDirectives()
BundleRequirement
All requirement directives not specified by the
wiring namespaces have no specified
semantics and are considered extra user defined information.
getDirectives in interface BundleRequirementgetDirectives in interface Requirementpublic Map<String,Object> getAttributes()
BundleRequirementRequirement attributes have no specified semantics and are considered extra user defined information.
getAttributes in interface BundleRequirementgetAttributes in interface Requirementpublic BundleRevision getResource()
BundleRequirement
This method returns the same value as BundleRequirement.getRevision().
getResource in interface BundleRequirementgetResource in interface Requirementnull
if this requirement is synthesized.public BundleRevision getRevision()
BundleRequirementgetRevision in interface BundleRequirementpublic boolean matches(BundleCapability cap)
BundleRequirementmatches in interface BundleRequirementcap - The capability to match to this requirement.true if the specified capability has the same
namespace as this requirement and the
filter for this requirement matches the
attributes of the
specified capability; false otherwise.public boolean isOptional()
public SimpleFilter getFilter()
Copyright © 2006–2021 The Apache Software Foundation. All rights reserved.