public class TypeInfoAttachments extends Object
Constructor and Description |
---|
TypeInfoAttachments() |
Modifier and Type | Method and Description |
---|---|
void |
addAttachment(String name,
Object attachment)
Set an attachment against the type.
|
Object |
getAttachment(String name)
Get an attachment from the type
|
void |
removeAttachment(String name)
Remove an attachment
|
public void addAttachment(String name, Object attachment)
If you add a future object, subsequent gets will wait for the result
WARNING: Be careful about what you put in here. Don't create references across classloaders, if you are not sure add a WeakReference to the information.
name
- the nameattachment
- the attachment, pass null to remove an attachmentIllegalArgumentException
- for a null namepublic void removeAttachment(String name)
name
- the nameIllegalArgumentException
- for a null nameCopyright © 2014 JBoss by Red Hat. All rights reserved.