public class HostedRequirement extends Object implements Requirement
| Constructor and Description |
|---|
HostedRequirement(Resource host,
Requirement req) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Map<String,Object> |
getAttributes()
Returns the attributes of this requirement.
|
Map<String,String> |
getDirectives()
Returns the directives of this requirement.
|
String |
getNamespace()
Returns the name space of this requirement.
|
Requirement |
getOriginalRequirement() |
Resource |
getResource()
Returns the resource declaring this requirement.
|
int |
hashCode() |
boolean |
matches(Capability capability)
Returns whether the specified capability matches this requirement.
|
String |
toString() |
public HostedRequirement(Resource host, Requirement req)
public Requirement getOriginalRequirement()
public Resource getResource()
RequirementgetResource in interface Requirementpublic String getNamespace()
RequirementgetNamespace in interface Requirementpublic Map<String,String> getDirectives()
RequirementOnly the following list of directives have specified semantics:
effective
filter
cardinality
resolution
visibility
- only recognized for the
osgi.wiring.bundle name
space.
getDirectives in interface Requirementpublic Map<String,Object> getAttributes()
RequirementRequirement attributes have no specified semantics and are considered extra user defined information.
getAttributes in interface Requirementpublic boolean matches(Capability capability)
RequirementA capability matches this requirement when all of the following are true:
name
space as this requirement.
filter
directive of this requirement matches the
attributes of the specified capability.
directives
that influence matching and that apply to the name space are satisfied.
See the capability
mandatory
directive.
matches in interface Requirementcapability - The capability to match to this requirement.true if the specified capability matches this this
requirement; false otherwise.Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.