|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.osgi.resolver.spi.AbstractResource
public class AbstractResource
The abstract implementation of an XResource.
| Constructor Summary | |
|---|---|
AbstractResource()
|
|
| Method Summary | ||
|---|---|---|
|
addAttachment(Class<T> clazz,
T value)
Attach an arbirtary object with this element. |
|
protected void |
addCapability(Capability cap)
|
|
protected void |
addRequirement(Requirement req)
|
|
|
getAttachment(Class<T> clazz)
Get the attached object for a given key |
|
List<Capability> |
getCapabilities(String namespace)
Returns the capabilities declared by this resource. |
|
XIdentityCapability |
getIdentityCapability()
Get the identity capability for this resource |
|
List<Requirement> |
getRequirements(String namespace)
Returns the requirements declared by this bundle resource. |
|
boolean |
isFragment()
True if this resource is a fragment |
|
|
removeAttachment(Class<T> clazz)
Remove an attached object for a given key |
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jboss.osgi.resolver.XAttachmentSupport |
|---|
addAttachment, getAttachment, removeAttachment |
| Methods inherited from interface org.osgi.resource.Resource |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public AbstractResource()
| Method Detail |
|---|
protected void addCapability(Capability cap)
protected void addRequirement(Requirement req)
public List<Capability> getCapabilities(String namespace)
Resource
getCapabilities in interface Resourcenamespace - The namespace of the declared capabilities to return or
null to return the declared capabilities from all
namespaces.
Capabilitys
from the specified namespace. The returned list will be empty if
this resource declares no capabilities in the specified
namespace.public List<Requirement> getRequirements(String namespace)
Resource
getRequirements in interface Resourcenamespace - The namespace of the declared requirements to return or
null to return the declared requirements from all
namespaces.
Requirement
s from the specified namespace. The returned list will be empty
if this resource declares no requirements in the specified
namespace.public XIdentityCapability getIdentityCapability()
XResource
getIdentityCapability in interface XResourcepublic boolean isFragment()
XResource
isFragment in interface XResourcepublic String toString()
toString in class Object
public <T> T addAttachment(Class<T> clazz,
T value)
XAttachmentSupport
addAttachment in interface XAttachmentSupportclazz - key for the attachment
public <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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||