public class AbstractPackageCapability extends AbstractCapability implements XPackageCapability
XPackageCapability
.Constructor and Description |
---|
AbstractPackageCapability(org.osgi.framework.resource.Resource res,
Map<String,Object> attrs,
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
|
protected Set<String> |
getMandatoryAttributes() |
String |
getPackageName() |
org.osgi.framework.Version |
getVersion() |
<T> T |
removeAttachment(Class<T> clazz)
Remove an attached object for a given key
|
getAttribute, getAttributes, getDirective, getDirectives, getNamespace, getResource, toString, validateAttributes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAttachment, getAttachment, removeAttachment
getAttribute, getAttributes
getDirective, getDirectives
protected Set<String> getMandatoryAttributes()
getMandatoryAttributes
in class AbstractCapability
public String getPackageName()
getPackageName
in interface XPackageCapability
public org.osgi.framework.Version getVersion()
getVersion
in interface XPackageCapability
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.