public class AbstractResource extends Object implements XResource
XResource
.Constructor and Description |
---|
AbstractResource() |
Modifier and Type | Method and Description |
---|---|
<T> T |
addAttachment(Class<T> clazz,
T value)
Attach an arbirtary object with this element.
|
protected void |
addCapability(org.osgi.framework.resource.Capability cap) |
protected void |
addRequirement(org.osgi.framework.resource.Requirement req) |
<T> T |
getAttachment(Class<T> clazz)
Get the attached object for a given key
|
List<org.osgi.framework.resource.Capability> |
getCapabilities(String namespace) |
InputStream |
getContent() |
XIdentityCapability |
getIdentityCapability() |
List<org.osgi.framework.resource.Requirement> |
getRequirements(String namespace) |
boolean |
isFragment() |
<T> T |
removeAttachment(Class<T> clazz)
Remove an attached object for a given key
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAttachment, getAttachment, removeAttachment
protected void addCapability(org.osgi.framework.resource.Capability cap)
protected void addRequirement(org.osgi.framework.resource.Requirement req)
public List<org.osgi.framework.resource.Capability> getCapabilities(String namespace)
getCapabilities
in interface org.osgi.framework.resource.Resource
public List<org.osgi.framework.resource.Requirement> getRequirements(String namespace)
getRequirements
in interface org.osgi.framework.resource.Resource
public XIdentityCapability getIdentityCapability()
getIdentityCapability
in interface XResource
public boolean isFragment()
isFragment
in interface XResource
public InputStream getContent()
getContent
in interface XResource
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.