public class AbstractCapability extends Object implements XCapability
XCapability.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCapability(org.osgi.framework.resource.Resource resource,
String namespace,
Map<String,Object> atts,
Map<String,String> dirs) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
addAttachment(Class<T> clazz,
T value)
Attach an arbirtary object with this element.
|
<T> T |
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
|
protected Set<String> |
getMandatoryAttributes() |
String |
getNamespace() |
org.osgi.framework.resource.Resource |
getResource() |
<T> T |
removeAttachment(Class<T> clazz)
Remove an attached object for a given key
|
String |
toString() |
protected void |
validateAttributes(Map<String,Object> atts) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddAttachment, getAttachment, removeAttachmentpublic org.osgi.framework.resource.Resource getResource()
getResource in interface org.osgi.framework.resource.Capabilitypublic String getNamespace()
getNamespace in interface org.osgi.framework.resource.Capabilitypublic Map<String,String> getDirectives()
XDirectiveSupportgetDirectives in interface XDirectiveSupportgetDirectives in interface org.osgi.framework.resource.Capabilitypublic String getDirective(String key)
XDirectiveSupportgetDirective in interface XDirectiveSupportpublic Map<String,Object> getAttributes()
XAttributeSupportgetAttributes in interface XAttributeSupportgetAttributes in interface org.osgi.framework.resource.Capabilitypublic Object getAttribute(String key)
XAttributeSupportgetAttribute in interface XAttributeSupportpublic <T> T addAttachment(Class<T> clazz, T value)
XAttachmentSupportaddAttachment in interface XAttachmentSupportclazz - key for the attachmentpublic <T> T getAttachment(Class<T> clazz)
XAttachmentSupportgetAttachment in interface XAttachmentSupportclazz - key for the attachmentpublic <T> T removeAttachment(Class<T> clazz)
XAttachmentSupportremoveAttachment in interface XAttachmentSupportclazz - key for the attachmentCopyright © 2012 JBoss by Red Hat. All Rights Reserved.