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, XHostCapability, XIdentityCapability, XPackageCapability, XResourceCapability, org.osgi.framework.wiring.BundleCapability, org.osgi.resource.Capability
public class AbstractBundleCapability
- extends AbstractCapability
- implements XBundleCapability
The abstract implementation of an XBundleCapability.
- Since:
- 30-May-2012
- Author:
- thomas.diesler@jboss.com
| Methods inherited from class org.jboss.osgi.resolver.spi.AbstractCapability |
adapt, getAttribute, getAttributes, getDirective, getDirectives, getNamespace, getPackageName, getSymbolicName, getType, getVersion, isSingleton, toString, validate |
| Methods inherited from interface org.osgi.framework.wiring.BundleCapability |
getAttributes, getDirectives, getNamespace |
| Methods inherited from interface org.osgi.resource.Capability |
equals, hashCode |
AbstractBundleCapability
public AbstractBundleCapability(XResource resource,
String namespace,
Map<String,Object> atts,
Map<String,String> dirs)
getResource
public XBundleRevision getResource()
- Specified by:
getResource in interface org.osgi.framework.wiring.BundleCapability- Specified by:
getResource in interface org.osgi.resource.Capability- Overrides:
getResource in class AbstractCapability
getRevision
public XBundleRevision getRevision()
- Specified by:
getRevision in interface org.osgi.framework.wiring.BundleCapability
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 JBoss by Red Hat. All Rights Reserved.