|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry5.internal.plastic.Lockable org.apache.tapestry5.internal.plastic.TryCatchBlockImpl
public class TryCatchBlockImpl
Method Summary | |
---|---|
void |
addCatch(String exceptionClassName,
InstructionBuilderCallback callback)
Ends the block (if not already ended) and inserts a catch block for the named exception. |
void |
addFinally(InstructionBuilderCallback callback)
As with TryCatchBlock.addCatch(String, InstructionBuilderCallback) , but the exception caught is
null, which acts as a finally block in the Java language. |
void |
addTry(InstructionBuilderCallback callback)
Invoked first, to generate the code in which exceptions may be caught. |
Methods inherited from class org.apache.tapestry5.internal.plastic.Lockable |
---|
check, lock |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void addTry(InstructionBuilderCallback callback)
TryCatchBlock
addTry
in interface TryCatchBlock
public void addCatch(String exceptionClassName, InstructionBuilderCallback callback)
TryCatchBlock
TryCatchBlock.addTry(InstructionBuilderCallback)
.
Note: no attempt is made currently to sort the handlers; for example adding a catch for java.lang.Exception first will mean that more specific exception handlers added later will never be invoked.
addCatch
in interface TryCatchBlock
exceptionClassName
- caught exception classcallback
- that implements the logic of the catch blockpublic void addFinally(InstructionBuilderCallback callback)
TryCatchBlock
TryCatchBlock.addCatch(String, InstructionBuilderCallback)
, but the exception caught is
null, which acts as a finally block in the Java language. This must be called last (after
TryCatchBlock.addTry(InstructionBuilderCallback)
and any calls to
TryCatchBlock.addCatch(String, InstructionBuilderCallback)
.
addFinally
in interface TryCatchBlock
callback
- implements the logic of the finally block
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |