org.apache.tapestry5.internal.plastic
Class Lockable
java.lang.Object
   org.apache.tapestry5.internal.plastic.Lockable
org.apache.tapestry5.internal.plastic.Lockable
- Direct Known Subclasses: 
- InstructionBuilderImpl, PlasticClassImpl, PlasticManager.PlasticManagerBuilder, SwitchBlockImpl, TryCatchBlockImpl
- public class Lockable 
- extends Object
An object that can be locked, at which point most of its functionality is disabled. This conforms to general
 builder approach used throughout Plastic where objects have an active construction phase, but are then locked
 (to encourage user code to discard them after they are no longer of any use).
 
| Method Summary | 
| protected  void | check()Checks to see if the object has been locked.
 | 
| protected  void | lock()Invokes
 check(), then sets the locked flag. | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
Lockable
public Lockable()
check
protected void check()
- Checks to see if the object has been locked.
 
- 
- Throws:
- IllegalStateException- if- lock()has been invoked.
 
lock
protected void lock()
- Invokes check(), then sets the locked flag. Subsequent calls tocheck()will fail.
 
- 
 
Copyright © 2003-2012 The Apache Software Foundation.