public class Ccatch extends Branch implements ParameterContainer, VariableScope
ProgramElement.TreeStructure
SourceElement.Position
comments
factory
STRUCTURAL_EQUALITY, STRUCTURAL_HASH_CODE
Modifier | Constructor and Description |
---|---|
|
Ccatch()
Ccatch.
|
protected |
Ccatch(Ccatch proto)
Ccatch.
|
|
Ccatch(CcatchNonstandardParameterDeclaration e,
StatementBlock body)
Ccatch.
|
|
Ccatch(ParameterDeclaration e,
StatementBlock body)
Ccatch.
|
getASTParent, getParent
getIndexOfChild, getIndexOfChild, getRoleOfChild, makeAllParentRolesValid, validateAll
getComments, setComments, validate
getEndPosition, getFactory, getFirstElement, getRelativePosition, getStartPosition, setEndPosition, setRelativePosition, setStartPosition, toSource
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getIndexOfChild, getIndexOfChild, getRoleOfChild, makeAllParentRolesValid, validateAll
getASTParent, getComments, setComments
getEndPosition, getFactory, getFirstElement, getRelativePosition, getStartPosition, setEndPosition, setRelativePosition, setStartPosition, toSource
validate
public Ccatch()
public Ccatch(ParameterDeclaration e, StatementBlock body)
e
- a parameter declaration.body
- a statement.public Ccatch(CcatchNonstandardParameterDeclaration e, StatementBlock body)
e
- a parameter declaration.body
- a statement.protected Ccatch(Ccatch proto)
proto
- a Ccatch.public Ccatch deepClone()
deepClone
in interface SourceElement
public void makeParentRoleValid()
makeParentRoleValid
in interface NonTerminalProgramElement
makeParentRoleValid
in class JavaNonTerminalProgramElement
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 int getChildPositionCode(ProgramElement child)
getChildPositionCode
in interface NonTerminalProgramElement
public boolean replaceChild(ProgramElement p, ProgramElement q)
replaceChild
in interface NonTerminalProgramElement
p
- the old child.p
- the new child.java.lang.ClassCastException
- if the new child cannot take over the role of the old one.public int getStatementCount()
getStatementCount
in interface StatementContainer
public Statement getStatementAt(int index)
getStatementAt
in interface StatementContainer
public int getParameterDeclarationCount()
getParameterDeclarationCount
in interface ParameterContainer
public ParameterDeclaration getParameterDeclarationAt(int index)
getParameterDeclarationAt
in interface ParameterContainer
public CcatchNonstandardParameterDeclaration getNonstandardParameterDeclarationAt(int index)
public Statement getBody()
public void setBody(Statement statement)
statement
- a statement.public void setParent(Exec parent)
parent
- a try.public boolean hasParameterDeclaration()
public boolean hasNonStdParameterDeclaration()
public ParameterDeclaration getParameterDeclaration()
public CcatchNonstandardParameterDeclaration getNonStdParameterDeclaration()
public void setParameterDeclaration(ParameterDeclaration p)
p
- a parameter declaration.public void setNonStdParameterDeclaration(CcatchNonstandardParameterDeclaration p)
p
- a parameter declaration.public boolean isDefinedScope()
isDefinedScope
in interface ScopeDefiningElement
public void setDefinedScope(boolean defined)
setDefinedScope
in interface ScopeDefiningElement
public java.util.List<VariableSpecification> getVariablesInScope()
getVariablesInScope
in interface VariableScope
public VariableSpecification getVariableInScope(java.lang.String name)
getVariableInScope
in interface VariableScope
public void addVariableToScope(VariableSpecification var)
addVariableToScope
in interface VariableScope
public void removeVariableFromScope(java.lang.String name)
removeVariableFromScope
in interface VariableScope
public void accept(SourceVisitor v)
accept
in interface SourceElement
Copyright © 2003-2019 The KeY-Project.