public class AbstractPackageRequirement extends AbstractRequirement implements XPackageRequirement
XPackageRequirement
.Constructor and Description |
---|
AbstractPackageRequirement(org.osgi.framework.resource.Resource res,
Map<String,Object> attrs,
Map<String,String> dirs,
boolean isdynamic) |
Modifier and Type | Method and Description |
---|---|
<T> T |
addAttachment(Class<T> clazz,
T value)
Attach an arbirtary object with this element.
|
<T> T |
getAttachment(Class<T> clazz)
Get the attached object for a given key
|
protected Set<String> |
getMandatoryAttributes() |
String |
getPackageName() |
org.jboss.osgi.metadata.VersionRange |
getVersionRange() |
boolean |
isDynamic() |
boolean |
matches(org.osgi.framework.resource.Capability cap) |
boolean |
matchNamespaceValue(org.osgi.framework.resource.Capability cap) |
<T> T |
removeAttachment(Class<T> clazz)
Remove an attached object for a given key
|
String |
toString() |
getAttribute, getAttributes, getDirective, getDirectives, getNamespace, getResource, isOptional, matchFilterValue, validateAttributes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isOptional
addAttachment, getAttachment, removeAttachment
getAttribute, getAttributes
getDirective, getDirectives
protected Set<String> getMandatoryAttributes()
getMandatoryAttributes
in class AbstractRequirement
public String getPackageName()
getPackageName
in interface XPackageRequirement
public org.jboss.osgi.metadata.VersionRange getVersionRange()
getVersionRange
in interface XPackageRequirement
public boolean isDynamic()
isDynamic
in interface XPackageRequirement
public boolean matchNamespaceValue(org.osgi.framework.resource.Capability cap)
matchNamespaceValue
in class AbstractRequirement
public boolean matches(org.osgi.framework.resource.Capability cap)
matches
in interface org.osgi.framework.resource.Requirement
matches
in class AbstractRequirement
public String toString()
toString
in class AbstractRequirement
public <T> T addAttachment(Class<T> clazz, T value)
XAttachmentSupport
addAttachment
in interface XAttachmentSupport
clazz
- key for the attachmentpublic <T> T getAttachment(Class<T> clazz)
XAttachmentSupport
getAttachment
in interface XAttachmentSupport
clazz
- key for the attachmentpublic <T> T removeAttachment(Class<T> clazz)
XAttachmentSupport
removeAttachment
in interface XAttachmentSupport
clazz
- key for the attachmentCopyright © 2013 JBoss by Red Hat. All Rights Reserved.