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()
Requirement
getResource
in interface Requirement
public String getNamespace()
Requirement
getNamespace
in interface Requirement
public Map<String,String> getDirectives()
Requirement
Only 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 Requirement
public Map<String,Object> getAttributes()
Requirement
Requirement attributes have no specified semantics and are considered extra user defined information.
getAttributes
in interface Requirement
public boolean matches(Capability capability)
Requirement
A 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 Requirement
capability
- 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.