public class AbstractPackageRequirement extends Object implements XPackageRequirement
XPackageRequirement.| Constructor and Description |
|---|
AbstractPackageRequirement(AbstractModule module,
String name,
Map<String,String> dirs,
Map<String,Object> atts) |
| 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
|
Object |
getAttribute(String key)
Get the value of the given attribute
|
Map<String,Object> |
getAttributes()
Get the attributes
|
String |
getBundleSymbolicName()
The bundle symbolic name of the exporting bundle
|
org.osgi.framework.Version |
getBundleVersion()
The bundle version of the exporting bundle
|
String |
getDirective(String key)
Get the value of the given directive
|
Map<String,String> |
getDirectives()
Get the directives
|
XModule |
getModule()
Get associated module.
|
String |
getName()
Get the name for this capability.
|
String |
getResolution()
The required resolution
|
XVersionRange |
getVersionRange()
Get the required version range
|
XCapability |
getWiredCapability()
Get the wired capbillity for this requirement.
|
boolean |
isDynamic()
True if this is a dynamic requirement.
|
boolean |
isOptional()
True if this requirement is optional
|
boolean |
match(XPackageCapability cap)
True if the given capability matches this requirement
|
boolean |
matchPackageName(XPackageCapability cap) |
<T> T |
removeAttachment(Class<T> clazz)
Remove an attached object for a given key
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisDynamicgetModule, getWiredCapability, isOptionalgetAttribute, getAttributesgetDirective, getDirectivesaddAttachment, getAttachment, removeAttachmentpublic String getResolution()
XPackageRequirementgetResolution in interface XPackageRequirementpublic XVersionRange getVersionRange()
XPackageRequirementgetVersionRange in interface XPackageRequirementpublic String getBundleSymbolicName()
XPackageRequirementgetBundleSymbolicName in interface XPackageRequirementpublic org.osgi.framework.Version getBundleVersion()
XPackageRequirementgetBundleVersion in interface XPackageRequirementpublic boolean match(XPackageCapability cap)
XPackageRequirementmatch in interface XPackageRequirementpublic boolean matchPackageName(XPackageCapability cap)
public XModule getModule()
XRequirementgetModule in interface XRequirementpublic boolean isOptional()
XRequirementisOptional in interface XRequirementpublic boolean isDynamic()
XRequirementisDynamic in interface XRequirementpublic XCapability getWiredCapability()
XRequirementgetWiredCapability in interface XRequirementpublic Object getAttribute(String key)
XAttributeSupportgetAttribute in interface XAttributeSupportpublic Map<String,Object> getAttributes()
XAttributeSupportgetAttributes in interface XAttributeSupportpublic String getDirective(String key)
XDirectiveSupportgetDirective in interface XDirectiveSupportpublic Map<String,String> getDirectives()
XDirectiveSupportgetDirectives in interface XDirectiveSupportpublic <T> T addAttachment(Class<T> clazz, T value)
XAttachmentSupportaddAttachment in interface XAttachmentSupportclazz - key for the attachmentpublic <T> T getAttachment(Class<T> clazz)
XAttachmentSupportgetAttachment in interface XAttachmentSupportclazz - key for the attachmentpublic <T> T removeAttachment(Class<T> clazz)
XAttachmentSupportremoveAttachment in interface XAttachmentSupportclazz - key for the attachmentCopyright © 2012 JBoss by Red Hat. All Rights Reserved.