org.jboss.osgi.resolver.spi
Class AbstractBundleCapability
java.lang.Object
org.jboss.osgi.resolver.spi.AbstractCapability
org.jboss.osgi.resolver.spi.AbstractBundleCapability
- All Implemented Interfaces:
- XAttachmentSupport, XAttributeSupport, XBundleCapability, XCapability, XDirectiveSupport, XElement, Capability
public class AbstractBundleCapability
- extends AbstractCapability
- implements XBundleCapability
The abstract implementation of a XBundleCapability.
- Since:
- 02-Jul-2010
- Author:
- thomas.diesler@jboss.com
AbstractBundleCapability
protected AbstractBundleCapability(Resource res,
Map<String,Object> atts,
Map<String,String> dirs)
getMandatoryAttributes
protected Set<String> getMandatoryAttributes()
- Overrides:
getMandatoryAttributes in class AbstractCapability
getSymbolicName
public String getSymbolicName()
- Description copied from interface:
XBundleCapability
- Get the bundle symbolic name.
- Specified by:
getSymbolicName in interface XBundleCapability
getVersion
public Version getVersion()
- Description copied from interface:
XBundleCapability
- Get the bundle version.
- Specified by:
getVersion in interface XBundleCapability
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.