public interface JTry extends JBlock
try block.JBlock.Braces| Modifier and Type | Method and Description |
|---|---|
JCatch |
_catch(int mods,
java.lang.Class<? extends java.lang.Throwable> type,
java.lang.String var)
Add a
catch block. |
JCatch |
_catch(int mods,
JType type,
java.lang.String var)
Add a
catch block. |
JCatch |
_catch(int mods,
java.lang.String type,
java.lang.String var)
Add a
catch block. |
JBlock |
_finally()
Add the
finally block for this try. |
JTry |
ignore(java.lang.Class<? extends java.lang.Throwable> type)
Add a
catch for an ignored exception. |
JTry |
ignore(JType type)
Add a
catch for an ignored exception. |
JTry |
ignore(java.lang.String type)
Add a
catch for an ignored exception. |
JVarDeclaration |
with(int mods,
java.lang.Class<? extends java.lang.AutoCloseable> type,
java.lang.String var,
JExpr init)
Add a resource for
try-with-resources constructs. |
JVarDeclaration |
with(int mods,
JType type,
java.lang.String var,
JExpr init)
Add a resource for
try-with-resources constructs. |
JVarDeclaration |
with(int mods,
java.lang.String type,
java.lang.String var,
JExpr init)
Add a resource for
try-with-resources constructs. |
_assert, _assert, _break, _break, _class, _continue, _continue, _do, _for, _if, _new, _new, _new, _newAnon, _newAnon, _newAnon, _return, _return, _switch, _synchronized, _throw, _try, _while, add, addAssign, andAssign, anonLabel, anonLabel, assign, blankLine, block, call, call, call, call, callStatic, callStatic, callStatic, callStatic, callSuper, callThis, divAssign, empty, forEach, forEach, forEach, forwardLabel, label, label, lshrAssign, modAssign, mulAssign, orAssign, postDec, postInc, preDec, preInc, shlAssign, shrAssign, subAssign, tempName, tempVar, tempVar, tempVar, var, var, var, var, var, var, xorAssignblockComment, lineCommentJVarDeclaration with(int mods, java.lang.String type, java.lang.String var, JExpr init)
try-with-resources constructs.mods - the resource variable modifierstype - the resource variable typevar - the resource variable nameinit - the resource variable initialization valueJVarDeclaration with(int mods, JType type, java.lang.String var, JExpr init)
try-with-resources constructs.mods - the resource variable modifierstype - the resource variable typevar - the resource variable nameinit - the resource variable initialization valueJVarDeclaration with(int mods, java.lang.Class<? extends java.lang.AutoCloseable> type, java.lang.String var, JExpr init)
try-with-resources constructs.mods - the resource variable modifierstype - the resource variable typevar - the resource variable nameinit - the resource variable initialization valueJCatch _catch(int mods, java.lang.String type, java.lang.String var)
catch block.mods - the catch block modifierstype - the exception typevar - the exception variable namecatch sub-blockJCatch _catch(int mods, java.lang.Class<? extends java.lang.Throwable> type, java.lang.String var)
catch block.mods - the catch block modifierstype - the exception typevar - the exception variable namecatch sub-blockJCatch _catch(int mods, JType type, java.lang.String var)
catch block.mods - the catch block modifierstype - the exception typevar - the exception variable namecatch sub-blockJTry ignore(java.lang.String type)
catch for an ignored exception.type - the exception typetry blockJTry ignore(java.lang.Class<? extends java.lang.Throwable> type)
catch for an ignored exception.type - the exception typetry blockJTry ignore(JType type)
catch for an ignored exception.type - the exception typetry blockJBlock _finally()
finally block for this try.finally sub-block