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, removeAttachment
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public XResource getResource()
XCapability
getResource
in interface XCapability
getResource
in interface org.osgi.resource.Capability
public String getNamespace()
getNamespace
in interface org.osgi.resource.Capability
public Map<String,String> getDirectives()
XDirectiveSupport
getDirectives
in interface XDirectiveSupport
getDirectives
in interface org.osgi.resource.Capability
public String getDirective(String key)
XDirectiveSupport
getDirective
in interface XDirectiveSupport
public Map<String,Object> getAttributes()
XAttributeSupport
getAttributes
in interface XAttributeSupport
getAttributes
in interface org.osgi.resource.Capability
public Object getAttribute(String key)
XAttributeSupport
getAttribute
in interface XAttributeSupport
public void validate()
XCapability
validate
in interface XCapability
public <T extends XCapability> T adapt(Class<T> clazz)
XCapability
adapt
in interface XCapability
public String getPackageName()
XPackageCapability
getPackageName
in interface XPackageCapability
public String getName()
XIdentityCapability
getName
in interface XHostCapability
getName
in interface XIdentityCapability
getName
in interface XResourceCapability
public org.osgi.framework.Version getVersion()
XIdentityCapability
getVersion
in interface XHostCapability
getVersion
in interface XIdentityCapability
getVersion
in interface XPackageCapability
getVersion
in interface XResourceCapability
public String getType()
XIdentityCapability
getType
in interface XIdentityCapability
IdentityNamespace.CAPABILITY_TYPE_ATTRIBUTE
public boolean isSingleton()
XIdentityCapability
isSingleton
in interface XIdentityCapability
Copyright © 2013 JBoss by Red Hat. All rights reserved.