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, wait
equals, hashCode
public BundleRequirementImpl(BundleRevision revision, String namespace, Map<String,String> dirs, Map<String,Object> attrs, SimpleFilter filter)
public String getNamespace()
BundleRequirement
getNamespace
in interface BundleRequirement
getNamespace
in interface Requirement
public 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 BundleRequirement
getDirectives
in interface Requirement
public Map<String,Object> getAttributes()
BundleRequirement
Requirement attributes have no specified semantics and are considered extra user defined information.
getAttributes
in interface BundleRequirement
getAttributes
in interface Requirement
public BundleRevision getResource()
BundleRequirement
This method returns the same value as BundleRequirement.getRevision()
.
getResource
in interface BundleRequirement
getResource
in interface Requirement
null
if this requirement is synthesized.public BundleRevision getRevision()
BundleRequirement
getRevision
in interface BundleRequirement
public boolean matches(BundleCapability cap)
BundleRequirement
matches
in interface BundleRequirement
cap
- 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–2016 The Apache Software Foundation. All rights reserved.