JBoss Modules 1.1.2.GA

org.jboss.modules.ref
Interface Reference<T,A>

Type Parameters:
T - the reference value type
A - the attachment type
All Known Implementing Classes:
PhantomReference, SoftReference, StrongReference, WeakReference

public interface Reference<T,A>

An enhanced reference type with a type-safe attachment.

Author:
David M. Lloyd
See Also:
Reference

Nested Class Summary
static class Reference.Type
          A reference type.
 
Method Summary
 void clear()
          Clear the reference.
 T get()
          Get the value, or null if the reference has been cleared.
 A getAttachment()
          Get the attachment, if any.
 Reference.Type getType()
          Get the type of the reference.
 

Method Detail

get

T get()
Get the value, or null if the reference has been cleared.

Returns:
the value

getAttachment

A getAttachment()
Get the attachment, if any.

Returns:
the attachment

clear

void clear()
Clear the reference.


getType

Reference.Type getType()
Get the type of the reference.

Returns:
the type

JBoss Modules 1.1.2.GA

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.