public abstract class AttachmentSupport extends Object implements Attachments
Attachments.Key
Constructor and Description |
---|
AttachmentSupport()
Construct with no attachments
|
AttachmentSupport(AttachmentSupport att)
Construct with given attachments
|
Modifier and Type | Method and Description |
---|---|
<T> T |
addAttachment(Class<T> clazz,
T obj)
Add arbitrary attachment
|
Object |
addAttachment(String name,
Object obj)
Add arbitrary attachment with name
|
<T> T |
addAttachment(String name,
T obj,
Class<T> clazz)
Add arbitrary attachment with name
|
<T> T |
getAttachment(Class<T> clazz)
Get an arbitrary attachment
|
Object |
getAttachment(String name)
Get an arbitrary attachment
|
<T> T |
getAttachment(String name,
Class<T> clazz)
Get an arbitrary attachment
|
Collection<Attachments.Key> |
getAttachmentKeys()
Get attachment keys
|
<T> T |
removeAttachment(Class<T> clazz)
Remove arbitrary attachments
|
<T> T |
removeAttachment(Class<T> clazz,
String name)
Remove arbitrary attachments
|
Object |
removeAttachment(String name)
Remove arbitrary attachments
|
String |
toString() |
public AttachmentSupport()
public AttachmentSupport(AttachmentSupport att)
public Collection<Attachments.Key> getAttachmentKeys()
Attachments
getAttachmentKeys
in interface Attachments
public <T> T getAttachment(Class<T> clazz)
Attachments
getAttachment
in interface Attachments
public <T> T getAttachment(String name, Class<T> clazz)
Attachments
getAttachment
in interface Attachments
public Object getAttachment(String name)
Attachments
getAttachment
in interface Attachments
public <T> T addAttachment(Class<T> clazz, T obj)
Attachments
addAttachment
in interface Attachments
public <T> T addAttachment(String name, T obj, Class<T> clazz)
Attachments
addAttachment
in interface Attachments
public Object addAttachment(String name, Object obj)
Attachments
addAttachment
in interface Attachments
public <T> T removeAttachment(Class<T> clazz)
Attachments
removeAttachment
in interface Attachments
public <T> T removeAttachment(Class<T> clazz, String name)
Attachments
removeAttachment
in interface Attachments
public Object removeAttachment(String name)
Attachments
removeAttachment
in interface Attachments
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.