Top Description Fields Constructors Methods
org.codehaus.groovy.util

public abstract Class LazyReference<T>

extends LockableObject
Class Inheritance
Known Direct Subclasses
org.codehaus.groovy.reflection.ClassInfo.LazyCachedClassRef, org.codehaus.groovy.reflection.ClassInfo.LazyClassLoaderRef

Soft reference with lazy initialization under lock

Field Summary

Modifier and TypeField and Description
private final ReferenceBundle
private static final ManagedReference<T>
private static final ManagedReference<T>
private ManagedReference<T>
private static final long
Inherited from org.codehaus.groovy.util.LockableObject:
owner

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public T
get()

private T
getLocked(boolean force)

public abstract T
public String
toString()

Overrides java.util.concurrent.locks.AbstractQueuedSynchronizer.toString.

Returns a string identifying this synchronizer, as well as its state.
Inherited from org.codehaus.groovy.util.LockableObject:
isHeldExclusivelylocktryAcquiretryReleaseunlock

Field Detail

bundleback to summary
private final ReferenceBundle bundle
INITback to summary
private static final ManagedReference<T> INIT
NULL_REFERENCEback to summary
private static final ManagedReference<T> NULL_REFERENCE
referenceback to summary
private ManagedReference<T> reference
serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.codehaus.groovy.util.LockableObject.serialVersionUID.

Constructor Detail

LazyReferenceback to summary
public LazyReference(ReferenceBundle bundle)

Method Detail

clearback to summary
public void clear()
getback to summary
public T get()
getLockedback to summary
private T getLocked(boolean force)
initValueback to summary
public abstract T initValue()
toStringback to summary
public String toString()

Overrides java.util.concurrent.locks.AbstractQueuedSynchronizer.toString.

Doc from java.util.concurrent.locks.AbstractQueuedSynchronizer.toString.

Returns a string identifying this synchronizer, as well as its state. The state, in brackets, includes the String "State =" followed by the current value of getState, and either "nonempty" or "empty" depending on whether the queue is empty.

Returns:String

a string identifying this synchronizer, as well as its state