org.jboss.osgi.resolver.spi
Class AbstractResource
java.lang.Object
org.jboss.osgi.resolver.spi.AbstractResource
- All Implemented Interfaces:
- XAttachmentSupport, XElement, XResource, org.osgi.framework.resource.Resource
public class AbstractResource
- extends Object
- implements XResource
The abstract implementation of an XResource.
- Since:
- 02-Jul-2010
- Author:
- thomas.diesler@jboss.com
| Methods inherited from interface org.jboss.osgi.resolver.XElement |
adapt |
AbstractResource
public AbstractResource()
getCapabilities
public List<org.osgi.framework.resource.Capability> getCapabilities(String namespace)
- Specified by:
getCapabilities in interface org.osgi.framework.resource.Resource
getRequirements
public List<org.osgi.framework.resource.Requirement> getRequirements(String namespace)
- Specified by:
getRequirements in interface org.osgi.framework.resource.Resource
getIdentityCapability
public XIdentityCapability getIdentityCapability()
- Specified by:
getIdentityCapability in interface XResource
toString
public String toString()
- Overrides:
toString in class Object
adapt
public <T> T adapt(Class<T> clazz)
- Specified by:
adapt in interface XElement
addAttachment
public <T> T addAttachment(Class<T> clazz,
T value)
- Description copied from interface:
XAttachmentSupport
- Attach an arbirtary object with this element.
- Specified by:
addAttachment in interface XAttachmentSupport
- Parameters:
clazz - key for the attachment
- Returns:
- The previously attachment object or null
getAttachment
public <T> T getAttachment(Class<T> clazz)
- Description copied from interface:
XAttachmentSupport
- Get the attached object for a given key
- Specified by:
getAttachment in interface XAttachmentSupport
- Parameters:
clazz - key for the attachment
- Returns:
- The attached object or null
removeAttachment
public <T> T removeAttachment(Class<T> clazz)
- Description copied from interface:
XAttachmentSupport
- Remove an attached object for a given key
- Specified by:
removeAttachment in interface XAttachmentSupport
- Parameters:
clazz - key for the attachment
- Returns:
- The attached object or null
Copyright © 2012. All Rights Reserved.