Interface JTry
- All Superinterfaces:
JBlock, JCommentable, JStatement
- All Known Subinterfaces:
JCatch
- All Known Implementing Classes:
ImplJCatch, ImplJTry
A
try block.-
Nested Class Summary
Nested classes/interfaces inherited from interface JBlock
JBlock.Braces -
Method Summary
Modifier and TypeMethodDescriptionAdd acatchblock.Add acatchblock.Add acatchblock._finally()Add thefinallyblock for thistry.Add acatchfor an ignored exception.Add acatchfor an ignored exception.Add acatchfor an ignored exception.with(int mods, Class<? extends AutoCloseable> type, String var, JExpr init) Add a resource fortry-with-resources constructs.Add a resource fortry-with-resources constructs.Add a resource fortry-with-resources constructs.Methods inherited from interface JBlock
_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, xorAssignMethods inherited from interface JCommentable
blockComment, lineComment
-
Method Details
-
with
Add a resource fortry-with-resources constructs.- Parameters:
mods- the resource variable modifierstype- the resource variable typevar- the resource variable nameinit- the resource variable initialization value- Returns:
- the variable declaration
-
with
Add a resource fortry-with-resources constructs.- Parameters:
mods- the resource variable modifierstype- the resource variable typevar- the resource variable nameinit- the resource variable initialization value- Returns:
- the variable declaration
-
with
Add a resource fortry-with-resources constructs.- Parameters:
mods- the resource variable modifierstype- the resource variable typevar- the resource variable nameinit- the resource variable initialization value- Returns:
- the variable declaration
-
_catch
-
_catch
-
_catch
-
ignore
-
ignore
-
ignore
-
_finally
-