class ImplJCatch extends BasicJBlock implements JCatch
JBlock.Braces| Modifier and Type | Field and Description |
|---|---|
private ImplJTry |
_try |
private int |
mods |
private java.util.ArrayList<JType> |
types |
private java.lang.String |
var |
| Constructor and Description |
|---|
ImplJCatch(ImplJTry _try,
int mods,
JType type,
java.lang.String var) |
| 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. |
(package private) int |
getMods() |
(package private) ImplJTry |
getTry() |
(package private) java.util.ArrayList<JType> |
getTypes() |
(package private) java.lang.String |
getVar() |
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. |
JCatch |
or(java.lang.Class<? extends java.lang.Throwable> orType)
Add another type option to this catch branch.
|
JCatch |
or(JType orType)
Add another type option to this catch branch.
|
JCatch |
or(java.lang.String orType)
Add another type option to this catch branch.
|
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. |
void |
write(SourceFileWriter writer) |
_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, get, getParent, hasSingleItemOfType, label, label, lshrAssign, modAssign, mulAssign, orAssign, postDec, postInc, preDec, preInc, shlAssign, shrAssign, size, subAssign, tempName, tempVar, tempVar, tempVar, var, var, var, var, var, var, write, write, xorAssignblockComment, lineComment, writeCommentsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait_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, lineCommentprivate final ImplJTry _try
private final int mods
private final java.lang.String var
private final java.util.ArrayList<JType> types
public JCatch or(JType orType)
JCatchpublic JCatch or(java.lang.String orType)
JCatchpublic JCatch or(java.lang.Class<? extends java.lang.Throwable> orType)
JCatchpublic JVarDeclaration with(int mods, java.lang.String type, java.lang.String var, JExpr init)
JTrytry-with-resources constructs.public JVarDeclaration with(int mods, JType type, java.lang.String var, JExpr init)
JTrytry-with-resources constructs.public JVarDeclaration with(int mods, java.lang.Class<? extends java.lang.AutoCloseable> type, java.lang.String var, JExpr init)
JTrytry-with-resources constructs.public JCatch _catch(int mods, java.lang.String type, java.lang.String var)
JTrycatch block.public JCatch _catch(int mods, java.lang.Class<? extends java.lang.Throwable> type, java.lang.String var)
JTrycatch block.public JCatch _catch(int mods, JType type, java.lang.String var)
JTrycatch block.public JTry ignore(java.lang.String type)
JTrycatch for an ignored exception.public JTry ignore(java.lang.Class<? extends java.lang.Throwable> type)
JTrycatch for an ignored exception.public JTry ignore(JType type)
JTrycatch for an ignored exception.public JBlock _finally()
JTryfinally block for this try.ImplJTry getTry()
java.util.ArrayList<JType> getTypes()
int getMods()
java.lang.String getVar()
public void write(SourceFileWriter writer) throws java.io.IOException
write in interface Writablewrite in class BasicJBlockjava.io.IOException