|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tapestry5.internal.plastic.Lockable
public class Lockable
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).
Constructor Summary | |
---|---|
Lockable()
|
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 |
Constructor Detail |
---|
public Lockable()
Method Detail |
---|
protected void check()
java.lang.IllegalStateException
- if lock()
has been invoked.protected void lock()
check()
, then sets the locked flag. Subsequent calls to check()
will fail.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |