public class CatchAllStatement extends JavaStatement implements StatementContainer, ExpressionContainer
ProgramElement.TreeStructure
SourceElement.Position
Modifier and Type | Field and Description |
---|---|
private StatementContainer |
astParent |
protected StatementBlock |
body |
protected VariableReference |
param |
private static long |
serialVersionUID |
parent
comments
factory
STRUCTURAL_EQUALITY, STRUCTURAL_HASH_CODE
Constructor and Description |
---|
CatchAllStatement(VariableReference r,
StatementBlock body)
Construct a catch all statement
|
Modifier and Type | Method and Description |
---|---|
void |
accept(SourceVisitor v) |
CatchAllStatement |
deepClone() |
NonTerminalProgramElement |
getASTParent() |
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.
|
int |
getChildPositionCode(ProgramElement child) |
Expression |
getExpressionAt(int index) |
int |
getExpressionCount() |
SourceElement |
getFirstElement()
Finds the source element that occurs first in the source.
|
SourceElement |
getLastElement()
Finds the source element that occurs last in the source.
|
java.lang.String |
getName() |
Statement |
getStatementAt(int i) |
StatementContainer |
getStatementContainer() |
int |
getStatementCount() |
VariableReference |
getVariable() |
void |
makeParentRoleValid()
Ensures that each child has "this" as syntactical parent.
|
boolean |
replaceChild(ProgramElement p,
ProgramElement q) |
void |
setStatementContainer(StatementContainer parent) |
getIndexOfChild, getIndexOfChild, getRoleOfChild, makeAllParentRolesValid, validateAll
getComments, setComments, validate
getEndPosition, getFactory, getRelativePosition, getStartPosition, setEndPosition, setRelativePosition, setStartPosition, toSource
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getIndexOfChild, getIndexOfChild, getRoleOfChild, makeAllParentRolesValid, validateAll
getComments, setComments
getEndPosition, getFactory, getRelativePosition, getStartPosition, setEndPosition, setRelativePosition, setStartPosition, toSource
validate
private static final long serialVersionUID
private StatementContainer astParent
protected StatementBlock body
protected VariableReference param
public CatchAllStatement(VariableReference r, StatementBlock body)
r
- the VariableReference of the catch clausebody
- the StatementBlock representing the catch clause's bodypublic NonTerminalProgramElement getASTParent()
getASTParent
in interface ProgramElement
getASTParent
in class JavaStatement
public StatementContainer getStatementContainer()
getStatementContainer
in interface Statement
getStatementContainer
in class JavaStatement
public int getStatementCount()
getStatementCount
in interface StatementContainer
public Statement getStatementAt(int i)
getStatementAt
in interface StatementContainer
public int getExpressionCount()
getExpressionCount
in interface ExpressionContainer
public Expression getExpressionAt(int index)
getExpressionAt
in interface ExpressionContainer
public VariableReference getVariable()
public void setStatementContainer(StatementContainer parent)
setStatementContainer
in interface Statement
setStatementContainer
in class JavaStatement
public SourceElement getFirstElement()
getFirstElement
in interface SourceElement
getFirstElement
in class JavaSourceElement
public SourceElement getLastElement()
getLastElement
in interface SourceElement
getLastElement
in class JavaSourceElement
public int getChildCount()
getChildCount
in interface NonTerminalProgramElement
public ProgramElement getChildAt(int index)
getChildAt
in interface NonTerminalProgramElement
index
- an index into this node's "virtual" child arrayjava.lang.ArrayIndexOutOfBoundsException
- if index is out
of boundspublic boolean replaceChild(ProgramElement p, ProgramElement q)
replaceChild
in interface NonTerminalProgramElement
public void makeParentRoleValid()
makeParentRoleValid
in interface NonTerminalProgramElement
makeParentRoleValid
in class JavaNonTerminalProgramElement
public int getChildPositionCode(ProgramElement child)
getChildPositionCode
in interface NonTerminalProgramElement
public void accept(SourceVisitor v)
accept
in interface SourceElement
public CatchAllStatement deepClone()
deepClone
in interface SourceElement
deepClone
in interface Statement
public java.lang.String getName()