Package org.jboss.jdeparser
Class ImplJCatch
- java.lang.Object
-
- org.jboss.jdeparser.BasicJCommentable
-
- org.jboss.jdeparser.BasicJBlock
-
- org.jboss.jdeparser.ImplJCatch
-
- All Implemented Interfaces:
BlockContent
,JBlock
,JCatch
,JCommentable
,JStatement
,JTry
,Writable
class ImplJCatch extends BasicJBlock implements JCatch
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.jdeparser.JBlock
JBlock.Braces
-
-
Constructor Summary
Constructors Constructor Description ImplJCatch(ImplJTry _try, int mods, JType type, java.lang.String var)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JCatch
_catch(int mods, java.lang.Class<? extends java.lang.Throwable> type, java.lang.String var)
Add acatch
block.JCatch
_catch(int mods, java.lang.String type, java.lang.String var)
Add acatch
block.JCatch
_catch(int mods, JType type, java.lang.String var)
Add acatch
block.JBlock
_finally()
Add thefinally
block for thistry
.(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 acatch
for an ignored exception.JTry
ignore(java.lang.String type)
Add acatch
for an ignored exception.JTry
ignore(JType type)
Add acatch
for an ignored exception.JCatch
or(java.lang.Class<? extends java.lang.Throwable> orType)
Add another type option to this catch branch.JCatch
or(java.lang.String orType)
Add another type option to this catch branch.JCatch
or(JType 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 fortry
-with-resources constructs.JVarDeclaration
with(int mods, java.lang.String type, java.lang.String var, JExpr init)
Add a resource fortry
-with-resources constructs.JVarDeclaration
with(int mods, JType type, java.lang.String var, JExpr init)
Add a resource fortry
-with-resources constructs.void
write(SourceFileWriter writer)
-
Methods inherited from class org.jboss.jdeparser.BasicJBlock
_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, xorAssign
-
Methods inherited from class org.jboss.jdeparser.BasicJCommentable
blockComment, lineComment, writeComments
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.jdeparser.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, xorAssign
-
Methods inherited from interface org.jboss.jdeparser.JCommentable
blockComment, lineComment
-
-
-
-
Method Detail
-
or
public JCatch or(JType orType)
Description copied from interface:JCatch
Add another type option to this catch branch.
-
or
public JCatch or(java.lang.String orType)
Description copied from interface:JCatch
Add another type option to this catch branch.
-
or
public JCatch or(java.lang.Class<? extends java.lang.Throwable> orType)
Description copied from interface:JCatch
Add another type option to this catch branch.
-
with
public JVarDeclaration with(int mods, java.lang.String type, java.lang.String var, JExpr init)
Description copied from interface:JTry
Add a resource fortry
-with-resources constructs.
-
with
public JVarDeclaration with(int mods, JType type, java.lang.String var, JExpr init)
Description copied from interface:JTry
Add a resource fortry
-with-resources constructs.
-
with
public JVarDeclaration with(int mods, java.lang.Class<? extends java.lang.AutoCloseable> type, java.lang.String var, JExpr init)
Description copied from interface:JTry
Add a resource fortry
-with-resources constructs.
-
_catch
public JCatch _catch(int mods, java.lang.String type, java.lang.String var)
Description copied from interface:JTry
Add acatch
block.
-
_catch
public JCatch _catch(int mods, java.lang.Class<? extends java.lang.Throwable> type, java.lang.String var)
Description copied from interface:JTry
Add acatch
block.
-
_catch
public JCatch _catch(int mods, JType type, java.lang.String var)
Description copied from interface:JTry
Add acatch
block.
-
ignore
public JTry ignore(java.lang.String type)
Description copied from interface:JTry
Add acatch
for an ignored exception.
-
ignore
public JTry ignore(java.lang.Class<? extends java.lang.Throwable> type)
Description copied from interface:JTry
Add acatch
for an ignored exception.
-
ignore
public JTry ignore(JType type)
Description copied from interface:JTry
Add acatch
for an ignored exception.
-
_finally
public JBlock _finally()
Description copied from interface:JTry
Add thefinally
block for thistry
.
-
getTry
ImplJTry getTry()
-
getTypes
java.util.ArrayList<JType> getTypes()
-
getMods
int getMods()
-
getVar
java.lang.String getVar()
-
write
public void write(SourceFileWriter writer) throws java.io.IOException
- Specified by:
write
in interfaceWritable
- Overrides:
write
in classBasicJBlock
- Throws:
java.io.IOException
-
-