public class Catch extends BranchImp implements ParameterContainer, VariableScope
| Modifier and Type | Field and Description |
|---|---|
protected StatementBlock |
body
Body.
|
protected ParameterDeclaration |
parameter
Parameter.
|
| Constructor and Description |
|---|
Catch()
Catch.
|
Catch(ExtList children)
Constructor for the transformation of COMPOST ASTs to KeY.
|
Catch(ParameterDeclaration e,
StatementBlock body)
Catch.
|
| Modifier and Type | Method and Description |
|---|---|
Statement |
getBody()
Get body.
|
ProgramElement |
getChildAt(int index)
Returns the child at the specified index in this node's "virtual"
child array
|
int |
getChildCount()
Returns the number of children of this node.
|
SourceElement |
getLastElement()
Finds the source element that occurs last in the source.
|
ParameterDeclaration |
getParameterDeclaration()
Get parameter declaration.
|
ParameterDeclaration |
getParameterDeclarationAt(int index)
Return the parameter declaration at the specified index in this node's
"virtual" parameter declaration array.
|
int |
getParameterDeclarationCount()
Get the number of parameters in this container.
|
Statement |
getStatementAt(int index) |
int |
getStatementCount()
Get the number of statements in this container.
|
void |
prettyPrint(PrettyPrinter p)
Pretty printing the source element.
|
void |
visit(Visitor v)
calls the corresponding method of a visitor in order to
perform some action/transformation on this element
|
compatibleBlockSize, computeHashCode, equals, equalsModRenaming, getArrayPos, match, matchChildrengetComments, hashCode, prettyPrintMain, reuseSignaturegetEndPosition, getFirstElement, getFirstElementIncludingBlocks, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetComments, matchequalsModRenaming, getEndPosition, getFirstElement, getFirstElementIncludingBlocks, getPositionInfo, getRelativePosition, getStartPositionprotected final ParameterDeclaration parameter
protected final StatementBlock body
public Catch()
public Catch(ParameterDeclaration e, StatementBlock body)
e - a parameter declaration.body - a statement.public Catch(ExtList children)
children - the children of this AST element as KeY classes.
May contain: Comments,
a ParameterDeclaration (declaring the catched
exceptions)
a StatementBlock (as the action to do when catching)public SourceElement getLastElement()
JavaSourceElementgetLastElement in interface SourceElementgetLastElement in class JavaSourceElementJavaSourceElement.toSource(),
JavaSourceElement.getEndPosition()public int getChildCount()
getChildCount in interface NonTerminalProgramElementpublic ProgramElement getChildAt(int index)
getChildAt in interface NonTerminalProgramElementindex - an index into this node's "virtual" child arrayjava.lang.ArrayIndexOutOfBoundsException - if index is out
of boundspublic int getStatementCount()
getStatementCount in interface StatementContainerpublic Statement getStatementAt(int index)
getStatementAt in interface StatementContainerpublic int getParameterDeclarationCount()
getParameterDeclarationCount in interface ParameterContainerpublic ParameterDeclaration getParameterDeclarationAt(int index)
ParameterContainergetParameterDeclarationAt in interface ParameterContainerindex - an index for a parameter declaration.public Statement getBody()
public ParameterDeclaration getParameterDeclaration()
public void visit(Visitor v)
visit in interface SourceElementv - the Visitorpublic void prettyPrint(PrettyPrinter p) throws java.io.IOException
JavaSourceElementprettyPrint in interface SourceElementprettyPrint in class JavaProgramElementp - a pretty printer.java.io.IOException - occasionally thrown.