public abstract class AbstractResource extends Object implements Resource
Resource| Constructor and Description |
|---|
AbstractResource() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
adapt(Class<T> type)
Adapt the this type to the given type
|
<T> T |
getAttachment(AttachmentKey<T> key)
Get the attached object for a given key
|
List<Capability> |
getCapabilities(String namespace) |
ResourceIdentity |
getIdentity() |
Capability |
getIdentityCapability() |
List<Requirement> |
getRequirements(String namespace) |
protected String |
getSimpleTypeName() |
Wiring |
getWiring() |
protected boolean |
isMutable() |
<T> T |
putAttachment(AttachmentKey<T> key,
T value)
Attach an arbirtary object with this element.
|
<T> T |
removeAttachment(AttachmentKey<T> key)
Remove an attached object for a given key
|
protected void |
setMutable(boolean flag) |
void |
setWiring(Wiring wiring) |
String |
toString() |
public <T> T adapt(Class<T> type)
Adaptablepublic Capability getIdentityCapability()
getIdentityCapability in interface Resourcepublic ResourceIdentity getIdentity()
getIdentity in interface Resourceprotected void setMutable(boolean flag)
protected boolean isMutable()
public List<Capability> getCapabilities(String namespace)
getCapabilities in interface Resourcepublic List<Requirement> getRequirements(String namespace)
getRequirements in interface Resourcepublic void setWiring(Wiring wiring)
public <T> T putAttachment(AttachmentKey<T> key, T value)
AttachableputAttachment in interface Attachablekey - key for the attachmentpublic <T> T getAttachment(AttachmentKey<T> key)
AttachablegetAttachment in interface Attachablekey - key for the attachmentpublic <T> T removeAttachment(AttachmentKey<T> key)
AttachableremoveAttachment in interface Attachablekey - key for the attachmentprotected String getSimpleTypeName()
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.