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, wait
addAttachment, getAttachment, removeAttachment
public org.osgi.framework.resource.Resource getResource()
getResource
in interface org.osgi.framework.resource.Capability
public String getNamespace()
getNamespace
in interface org.osgi.framework.resource.Capability
public Map<String,String> getDirectives()
XDirectiveSupport
getDirectives
in interface XDirectiveSupport
getDirectives
in interface org.osgi.framework.resource.Capability
public String getDirective(String key)
XDirectiveSupport
getDirective
in interface XDirectiveSupport
public Map<String,Object> getAttributes()
XAttributeSupport
getAttributes
in interface XAttributeSupport
getAttributes
in interface org.osgi.framework.resource.Capability
public Object getAttribute(String key)
XAttributeSupport
getAttribute
in interface XAttributeSupport
public <T> T addAttachment(Class<T> clazz, T value)
XAttachmentSupport
addAttachment
in interface XAttachmentSupport
clazz
- key for the attachmentpublic <T> T getAttachment(Class<T> clazz)
XAttachmentSupport
getAttachment
in interface XAttachmentSupport
clazz
- key for the attachmentpublic <T> T removeAttachment(Class<T> clazz)
XAttachmentSupport
removeAttachment
in interface XAttachmentSupport
clazz
- key for the attachmentCopyright © 2012 JBoss by Red Hat. All Rights Reserved.