public class AbstractCapability extends AbstractElement implements XIdentityCapability, XHostCapability, XPackageCapability, XResourceCapability, XProvidedCapability
XCapability.| Constructor and Description |
|---|
AbstractCapability(XResource resource,
String namespace,
Map<String,Object> atts,
Map<String,String> dirs) |
| Modifier and Type | Method and Description |
|---|---|
<T extends XCapability> |
adapt(Class<T> clazz)
Adapt this capability to another type
|
Object |
getAttribute(String key)
Get the value of the given attribute
|
Map<String,Object> |
getAttributes()
Get the attributes
|
String |
getDirective(String key)
Get the value of the given directive
|
Map<String,String> |
getDirectives()
Get the directives
|
String |
getName()
The identity name of this resource.
|
String |
getNamespace() |
String |
getPackageName()
The package name
|
XResource |
getResource()
Get the resource declaring this capability.
|
String |
getType()
The resource type
|
org.osgi.framework.Version |
getVersion()
The version of this resource.
|
boolean |
isSingleton()
A flag to indicate that this resource is a singleton
|
String |
toString() |
void |
validate()
Validate the capability
|
getAttachment, putAttachment, removeAttachmentclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAttachment, putAttachment, removeAttachmentpublic XResource getResource()
XCapabilitygetResource in interface XCapabilitygetResource in interface org.osgi.resource.Capabilitypublic String getNamespace()
getNamespace in interface org.osgi.resource.Capabilitypublic Map<String,String> getDirectives()
XDirectiveSupportgetDirectives in interface XDirectiveSupportgetDirectives in interface org.osgi.resource.Capabilitypublic String getDirective(String key)
XDirectiveSupportgetDirective in interface XDirectiveSupportpublic Map<String,Object> getAttributes()
XAttributeSupportgetAttributes in interface XAttributeSupportgetAttributes in interface org.osgi.resource.Capabilitypublic Object getAttribute(String key)
XAttributeSupportgetAttribute in interface XAttributeSupportpublic void validate()
XCapabilityvalidate in interface XCapabilitypublic <T extends XCapability> T adapt(Class<T> clazz)
XCapabilityadapt in interface XCapabilitypublic String getPackageName()
XPackageCapabilitygetPackageName in interface XPackageCapabilitypublic String getName()
XIdentityCapabilitygetName in interface XHostCapabilitygetName in interface XIdentityCapabilitygetName in interface XResourceCapabilitypublic org.osgi.framework.Version getVersion()
XIdentityCapabilitygetVersion in interface XHostCapabilitygetVersion in interface XIdentityCapabilitygetVersion in interface XPackageCapabilitygetVersion in interface XResourceCapabilitypublic String getType()
XIdentityCapabilitygetType in interface XIdentityCapabilityIdentityNamespace.CAPABILITY_TYPE_ATTRIBUTEpublic boolean isSingleton()
XIdentityCapabilityisSingleton in interface XIdentityCapabilityCopyright © 2016 JBoss by Red Hat. All rights reserved.