Top Description Inners Methods
org.jboss.modules.ref

public Interface Reference<T, A>

Known Direct Implementers
org.jboss.modules.ref.SoftReference, org.jboss.modules.ref.StrongReference, org.jboss.modules.ref.WeakReference, org.jboss.modules.ref.PhantomReference
Type Parameters
<T>
the reference value type
<A>
the attachment type

An enhanced reference type with a type-safe attachment.
Author
David M. Lloyd
See Also
java.lang.ref.Reference

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
Reference.Type

A reference type.

Method Summary

Modifier and TypeMethod and Description
public void
clear()

Clear the reference.

public T

Returns:

the value
get
()

Get the value, or null if the reference has been cleared.

public A

Returns:

the attachment
getAttachment
()

Get the attachment, if any.

public Reference.Type

Returns:

the type
getType
()

Get the type of the reference.

Method Detail

clearback to summary
public void clear()

Clear the reference.

getback to summary
public T get()

Get the value, or null if the reference has been cleared.

Returns:T

the value

getAttachmentback to summary
public A getAttachment()

Get the attachment, if any.

Returns:A

the attachment

getTypeback to summary
public Reference.Type getType()

Get the type of the reference.

Returns:Reference.Type

the type

org.jboss.modules.ref back to summary

public final Enum Reference.Type

extends Enum<Reference.Type>
Class Inheritance

A reference type.

Field Summary

Modifier and TypeField and Description
public static final Reference.Type
NULL

A null reference.

public static final Reference.Type
PHANTOM

A phantom reference.

public static final Reference.Type
SOFT

A soft reference.

public static final Reference.Type
STRONG

A strong reference.

public static final Reference.Type
WEAK

A weak reference.

Constructor Summary

AccessConstructor and Description
private
Type()

Method Summary

Modifier and TypeMethod and Description
public static Reference.Type
public static Reference.Type[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

NULLback to summary
public static final Reference.Type NULL

A null reference.

PHANTOMback to summary
public static final Reference.Type PHANTOM

A phantom reference.

SOFTback to summary
public static final Reference.Type SOFT

A soft reference.

STRONGback to summary
public static final Reference.Type STRONG

A strong reference.

WEAKback to summary
public static final Reference.Type WEAK

A weak reference.

Constructor Detail

Typeback to summary
private Type()

Method Detail

valueOfback to summary
public static Reference.Type valueOf(String name)
valuesback to summary
public static Reference.Type[] values()