org.jboss.osgi.resolver.spi
Class AbstractBundleRequirement
java.lang.Object
org.jboss.osgi.resolver.spi.AbstractRequirement
org.jboss.osgi.resolver.spi.AbstractBundleRequirement
- All Implemented Interfaces:
- XAttachmentSupport, XAttributeSupport, XBundleRequirement, XDirectiveSupport, XElement, XHostRequirement, XPackageRequirement, XRequirement, XResourceRequirement, org.osgi.framework.wiring.BundleRequirement, org.osgi.resource.Requirement
public class AbstractBundleRequirement
- extends AbstractRequirement
- implements XBundleRequirement
The abstract implementation of an XBundleRequirement.
- Since:
- 30-May-2012
- Author:
- thomas.diesler@jboss.com
| Methods inherited from class org.jboss.osgi.resolver.spi.AbstractRequirement |
adapt, getAttribute, getAttributes, getDirective, getDirectives, getFilterFromDirective, getNamespace, getPackageName, getSymbolicName, getVersionRange, getVisibility, isDynamic, isOptional, matches, namespaceValueFromFilter, toString, validate |
| Methods inherited from interface org.osgi.framework.wiring.BundleRequirement |
getAttributes, getDirectives, getNamespace |
| Methods inherited from interface org.osgi.resource.Requirement |
equals, hashCode |
AbstractBundleRequirement
public AbstractBundleRequirement(XResource resource,
String namespace,
Map<String,Object> atts,
Map<String,String> dirs)
getResource
public org.osgi.framework.wiring.BundleRevision getResource()
- Specified by:
getResource in interface org.osgi.framework.wiring.BundleRequirement- Specified by:
getResource in interface org.osgi.resource.Requirement- Overrides:
getResource in class AbstractRequirement
getRevision
public org.osgi.framework.wiring.BundleRevision getRevision()
- Specified by:
getRevision in interface org.osgi.framework.wiring.BundleRequirement
matches
public boolean matches(org.osgi.framework.wiring.BundleCapability cap)
- Specified by:
matches in interface org.osgi.framework.wiring.BundleRequirement
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.