org.jboss.osgi.resolver.spi
Interface AttachmentSupport


public interface AttachmentSupport

Adds attachment support to an element

Since:
02-Jul-2010
Author:
thomas.diesler@jboss.com

Method Summary
<T> T
addAttachment(Class<T> clazz, T value)
          Attach an arbirtary object with this element.
<T> T
getAttachment(Class<T> clazz)
          Get the attached object for a given key
<T> T
removeAttachment(Class<T> clazz)
          Remove an attached object for a given key
 

Method Detail

addAttachment

<T> T addAttachment(Class<T> clazz,
                    T value)
Attach an arbirtary object with this element.

Parameters:
clazz - key for the attachment
Returns:
The previously attachment object or null

getAttachment

<T> T getAttachment(Class<T> clazz)
Get the attached object for a given key

Parameters:
clazz - key for the attachment
Returns:
The attached object or null

removeAttachment

<T> T removeAttachment(Class<T> clazz)
Remove an attached object for a given key

Parameters:
clazz - key for the attachment
Returns:
The attached object or null


Copyright © 2010. All Rights Reserved.