org.jboss.osgi.resolver.v2.spi
Class AbstractIdentityRequirement
java.lang.Object
org.jboss.osgi.resolver.v2.spi.AbstractRequirement
org.jboss.osgi.resolver.v2.spi.AbstractIdentityRequirement
- All Implemented Interfaces:
- XAttachmentSupport, XAttributeSupport, XDirectiveSupport, XElement, XIdentityRequirement, XRequirement, org.osgi.framework.resource.Requirement
public class AbstractIdentityRequirement
- extends AbstractRequirement
- implements XIdentityRequirement
The abstract implementation of a XIdentityRequirement.
- Since:
- 02-Jul-2010
- Author:
- thomas.diesler@jboss.com
| Methods inherited from class org.jboss.osgi.resolver.v2.spi.AbstractRequirement |
getAttribute, getAttributes, getDirective, getDirectives, getNamespace, getResource, isOptional, matchFilterValue, matchNamespaceValue, toString, validateAttributes |
| Methods inherited from interface org.osgi.framework.resource.Requirement |
getAttributes, getDirectives, getNamespace, getResource |
AbstractIdentityRequirement
protected AbstractIdentityRequirement(org.osgi.framework.resource.Resource res,
Map<String,Object> atts,
Map<String,String> dirs)
getMandatoryAttributes
protected Set<String> getMandatoryAttributes()
- Overrides:
getMandatoryAttributes in class AbstractRequirement
getSymbolicName
public String getSymbolicName()
- Specified by:
getSymbolicName in interface XIdentityRequirement
getVersionRange
public org.jboss.osgi.metadata.VersionRange getVersionRange()
- Specified by:
getVersionRange in interface XIdentityRequirement
getVisibility
public String getVisibility()
- Specified by:
getVisibility in interface XIdentityRequirement
matches
public boolean matches(org.osgi.framework.resource.Capability cap)
- Specified by:
matches in interface org.osgi.framework.resource.Requirement- Overrides:
matches in class AbstractRequirement
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.