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 |
getNamespace() |
String |
getPackageName()
The package name
|
XResource |
getResource() |
String |
getSymbolicName()
The symbolic name of this resource.
|
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
|
addAttachment, getAttachment, removeAttachmentclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddAttachment, getAttachment, removeAttachmentpublic XResource getResource()
getResource 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 getSymbolicName()
XIdentityCapabilitygetSymbolicName in interface XHostCapabilitygetSymbolicName in interface XIdentityCapabilitygetSymbolicName 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 © 2013 JBoss by Red Hat. All Rights Reserved.