org.jboss.osgi.resolver.v2.spi
Class AbstractBundleCapability
java.lang.Object
org.jboss.osgi.resolver.v2.spi.AbstractCapability
org.jboss.osgi.resolver.v2.spi.AbstractBundleCapability
- All Implemented Interfaces:
- XAttachmentSupport, XAttributeSupport, XCapability, XDirectiveSupport, XElement, org.osgi.framework.resource.Capability, org.osgi.framework.wiring.BundleCapability
public class AbstractBundleCapability
- extends AbstractCapability
- implements org.osgi.framework.wiring.BundleCapability
The abstract implementation of a BundleCapability.
- Since:
- 02-Jul-2010
- Author:
- thomas.diesler@jboss.com
| Methods inherited from interface org.osgi.framework.wiring.BundleCapability |
getAttributes, getDirectives, getNamespace |
AbstractBundleCapability
public AbstractBundleCapability(org.osgi.framework.wiring.BundleRevision brev,
String namespace,
Map<String,Object> atts,
Map<String,String> dirs)
getRevision
public org.osgi.framework.wiring.BundleRevision getRevision()
- Specified by:
getRevision in interface org.osgi.framework.wiring.BundleCapability
getResource
public org.osgi.framework.wiring.BundleRevision getResource()
- Specified by:
getResource in interface org.osgi.framework.resource.Capability- Specified by:
getResource in interface org.osgi.framework.wiring.BundleCapability- Overrides:
getResource in class AbstractCapability
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.