|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.osgi.resolver.spi.AbstractCapabilityWrapper
public class AbstractCapabilityWrapper
A wrapper for XCapability.
| Constructor Summary | |
|---|---|
AbstractCapabilityWrapper(XCapability delegate)
|
|
| Method Summary | ||
|---|---|---|
|
adapt(Class<T> clazz)
Adapt this capability to another type |
|
|
addAttachment(Class<T> clazz,
T value)
Attach an arbirtary object with this element. |
|
boolean |
equals(Object obj)
Compares this Capability to another Capability. |
|
|
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 |
|
String |
getNamespace()
Returns the namespace of this capability. |
|
Resource |
getResource()
Returns the resource declaring this capability. |
|
int |
hashCode()
Returns the hashCode of this Capability. |
|
|
removeAttachment(Class<T> clazz)
Remove an attached object for a given key |
|
String |
toString()
|
|
void |
validate()
Validate the capability |
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractCapabilityWrapper(XCapability delegate)
| Method Detail |
|---|
public <T> T addAttachment(Class<T> clazz,
T value)
XAttachmentSupport
addAttachment in interface XAttachmentSupportclazz - key for the attachment
public Map<String,Object> getAttributes()
XAttributeSupport
getAttributes in interface XAttributeSupportgetAttributes in interface Capabilitypublic Map<String,String> getDirectives()
XDirectiveSupport
getDirectives in interface XDirectiveSupportgetDirectives in interface Capabilitypublic void validate()
XCapability
validate in interface XCapabilitypublic Object getAttribute(String key)
XAttributeSupport
getAttribute in interface XAttributeSupportpublic String getDirective(String key)
XDirectiveSupport
getDirective in interface XDirectiveSupportpublic <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
public String getNamespace()
Capability
getNamespace in interface Capabilitypublic Resource getResource()
Capability
getResource in interface Capabilitypublic <T extends XCapability> T adapt(Class<T> clazz)
XCapability
adapt in interface XCapabilitypublic boolean equals(Object obj)
CapabilityCapability to another Capability.
This Capability is equal to another Capability if they
have the same namespace, directives and attributes and are declared by
the same resource.
equals in interface Capabilityequals in class Objectobj - The object to compare against this Capability.
true if this Capability is equal to the other
object; false otherwise.public int hashCode()
CapabilityCapability.
hashCode in interface CapabilityhashCode in class ObjectCapability.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||