Package org.picocontainer.references
Class SimpleReference<T>
- java.lang.Object
-
- org.picocontainer.references.SimpleReference<T>
-
- All Implemented Interfaces:
Serializable
,ObjectReference<T>
public class SimpleReference<T> extends Object implements ObjectReference<T>, Serializable
Simple instance implementation of ObjectReference.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SimpleReference()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
get()
Retrieve an actual reference to the object.void
set(T item)
Assign an object to the reference.
-
-
-
Method Detail
-
get
public T get()
Description copied from interface:ObjectReference
Retrieve an actual reference to the object. Returns null if the reference is not available or has not been populated yet.- Specified by:
get
in interfaceObjectReference<T>
- Returns:
- an actual reference to the object.
-
set
public void set(T item)
Description copied from interface:ObjectReference
Assign an object to the reference.- Specified by:
set
in interfaceObjectReference<T>
- Parameters:
item
- the object to assign to the reference. May benull
.
-
-