|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.osgi.resolver.spi.AbstractRequirement
public class AbstractRequirement
The abstract implementation of a XRequirement.
| Constructor Summary | |
|---|---|
AbstractRequirement(XResource resource,
String namespace,
Map<String,Object> atts,
Map<String,String> dirs)
|
|
| Method Summary | ||
|---|---|---|
|
adapt(Class<T> clazz)
Adapt this requirement to another type |
|
|
addAttachment(Class<T> clazz,
T value)
Attach an arbirtary object with this element. |
|
|
getAttachment(Class<T> clazz)
Get the attached object for a given key |
|
Object |
getAttribute(String key)
Get the value of the given attribute |
|
Map<String,Object> |
getAttributes()
Get the attributes |
|
String |
getDirective(String key)
Get the value of the given directive |
|
Map<String,String> |
getDirectives()
Get the directives |
|
static org.osgi.framework.Filter |
getFilterFromDirective(Requirement req)
|
|
String |
getNamespace()
Returns the namespace of this requirement. |
|
Resource |
getResource()
Returns the resource declaring this requirement. |
|
boolean |
isOptional()
A flag indicating that this is an optional requirement. |
|
boolean |
matches(Capability cap)
Matches this requirement against the given capability. |
|
static String |
namespaceValueFromFilter(org.osgi.framework.Filter filter,
String namespace)
|
|
|
removeAttachment(Class<T> clazz)
Remove an attached object for a given key |
|
String |
toString()
|
|
void |
validate()
Validate the requirement |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jboss.osgi.resolver.XAttachmentSupport |
|---|
addAttachment, getAttachment, removeAttachment |
| Methods inherited from interface org.osgi.resource.Requirement |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public AbstractRequirement(XResource resource,
String namespace,
Map<String,Object> atts,
Map<String,String> dirs)
| Method Detail |
|---|
public Resource getResource()
Requirement
getResource in interface Requirementnull
if this requirement is synthesized.public void validate()
XRequirement
validate in interface XRequirementpublic static org.osgi.framework.Filter getFilterFromDirective(Requirement req)
public static String namespaceValueFromFilter(org.osgi.framework.Filter filter,
String namespace)
public String getNamespace()
Requirement
getNamespace in interface Requirementpublic boolean isOptional()
XRequirement
isOptional in interface XRequirementpublic Map<String,String> getDirectives()
XDirectiveSupport
getDirectives in interface XDirectiveSupportgetDirectives in interface Requirementpublic String getDirective(String key)
XDirectiveSupport
getDirective in interface XDirectiveSupportpublic Map<String,Object> getAttributes()
XAttributeSupport
getAttributes in interface XAttributeSupportgetAttributes in interface Requirementpublic Object getAttribute(String key)
XAttributeSupport
getAttribute in interface XAttributeSupportpublic <T extends XRequirement> T adapt(Class<T> clazz)
XRequirement
adapt in interface XRequirementpublic boolean matches(Capability cap)
XRequirement
matches in interface XRequirementpublic String toString()
toString in class Object
public <T> T addAttachment(Class<T> clazz,
T value)
XAttachmentSupport
addAttachment in interface XAttachmentSupportclazz - key for the attachment
public <T> T getAttachment(Class<T> clazz)
XAttachmentSupport
getAttachment in interface XAttachmentSupportclazz - key for the attachment
public <T> T removeAttachment(Class<T> clazz)
XAttachmentSupport
removeAttachment in interface XAttachmentSupportclazz - key for the attachment
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||