org.codehaus.groovy.reflection
Class LazyReference<T>

java.lang.Object
  extended by java.util.concurrent.locks.AbstractOwnableSynchronizer
      extended by java.util.concurrent.locks.AbstractQueuedSynchronizer
          extended by org.codehaus.groovy.reflection.LockableObject
              extended by org.codehaus.groovy.reflection.LazyReference<T>
All Implemented Interfaces:
Serializable

public abstract class LazyReference<T>
extends LockableObject

Reference with lazy initialization under lock

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer
java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject
 
Constructor Summary
LazyReference()
           
 
Method Summary
 T get()
           
 T getNullable()
           
abstract  T initValue()
           
 void set(T newVal)
           
 
Methods inherited from class org.codehaus.groovy.reflection.LockableObject
isHeldExclusively, lock, tryAcquire, tryRelease, unlock
 
Methods inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer
acquire, acquireInterruptibly, acquireShared, acquireSharedInterruptibly, compareAndSetState, getExclusiveQueuedThreads, getFirstQueuedThread, getQueuedThreads, getQueueLength, getSharedQueuedThreads, getState, getWaitingThreads, getWaitQueueLength, hasContended, hasQueuedThreads, hasWaiters, isQueued, owns, release, releaseShared, setState, toString, tryAcquireNanos, tryAcquireShared, tryAcquireSharedNanos, tryReleaseShared
 
Methods inherited from class java.util.concurrent.locks.AbstractOwnableSynchronizer
getExclusiveOwnerThread, setExclusiveOwnerThread
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LazyReference

public LazyReference()
Method Detail

get

public T get()

set

public void set(T newVal)

getNullable

public T getNullable()

initValue

public abstract T initValue()

Copyright © 2003-2008 The Codehaus. All rights reserved.