|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.osgi.resolver.spi.AbstractCapability
public class AbstractCapability
The abstract implementation of a XCapability.
| Constructor Summary | |
|---|---|
AbstractCapability(XResource resource,
String namespace,
Map<String,Object> atts,
Map<String,String> dirs)
|
|
| Method Summary | ||
|---|---|---|
|
adapt(Class<T> clazz)
Adapt this capability to another type |
|
|
addAttachment(Class<T> clazz,
T value)
Attach an arbirtary object with this element. |
|
|
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 |
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 |
|
|
removeAttachment(Class<T> clazz)
Remove an attached object for a given key |
|
String |
toString()
|
|
void |
validate()
Validate the capability |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jboss.osgi.resolver.XAttachmentSupport |
|---|
addAttachment, getAttachment, removeAttachment |
| Methods inherited from interface org.osgi.resource.Capability |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public AbstractCapability(XResource resource,
String namespace,
Map<String,Object> atts,
Map<String,String> dirs)
| Method Detail |
|---|
public XResource getResource()
getResource in interface org.osgi.resource.Capabilitypublic String getNamespace()
getNamespace in interface org.osgi.resource.Capabilitypublic Map<String,String> getDirectives()
XDirectiveSupport
getDirectives in interface XDirectiveSupportgetDirectives in interface org.osgi.resource.Capabilitypublic String getDirective(String key)
XDirectiveSupport
getDirective in interface XDirectiveSupportpublic Map<String,Object> getAttributes()
XAttributeSupport
getAttributes in interface XAttributeSupportgetAttributes in interface org.osgi.resource.Capabilitypublic Object getAttribute(String key)
XAttributeSupport
getAttribute in interface XAttributeSupportpublic void validate()
XCapability
validate in interface XCapabilitypublic <T extends XCapability> T adapt(Class<T> clazz)
XCapability
adapt in interface XCapabilitypublic String getPackageName()
XPackageCapability
getPackageName in interface XPackageCapabilitypublic String getSymbolicName()
XIdentityCapability
getSymbolicName in interface XHostCapabilitygetSymbolicName in interface XIdentityCapabilitygetSymbolicName in interface XResourceCapabilitypublic org.osgi.framework.Version getVersion()
XIdentityCapability
getVersion in interface XHostCapabilitygetVersion in interface XIdentityCapabilitygetVersion in interface XPackageCapabilitygetVersion in interface XResourceCapabilitypublic String getType()
XIdentityCapability
getType in interface XIdentityCapabilityIdentityNamespace.CAPABILITY_TYPE_ATTRIBUTEpublic boolean isSingleton()
XIdentityCapability
isSingleton in interface XIdentityCapabilitypublic String toString()
toString in class Object
public <T> T addAttachment(Class<T> clazz,
T value)
XAttachmentSupport
addAttachment in interface XAttachmentSupportclazz - key for the attachment
public <T> T getAttachment(Class<T> clazz)
XAttachmentSupport
getAttachment in interface XAttachmentSupportclazz - key for the attachment
public <T> T removeAttachment(Class<T> clazz)
XAttachmentSupport
removeAttachment in interface XAttachmentSupportclazz - key for the attachment
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||