public class Exec extends BranchStatement implements StatementContainer, VariableScope
ProgramElement.TreeStructure
SourceElement.Position
parent
comments
factory
STRUCTURAL_EQUALITY, STRUCTURAL_HASH_CODE
Modifier | Constructor and Description |
---|---|
|
Exec()
Exec.
|
protected |
Exec(Exec proto)
Exec.
|
|
Exec(StatementBlock body)
Exec.
|
|
Exec(StatementBlock body,
ASTList<Branch> branches)
Exec.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(SourceVisitor v) |
void |
addVariableToScope(VariableSpecification var) |
Exec |
deepClone()
Deep clone.
|
StatementBlock |
getBody()
Get body.
|
Branch |
getBranchAt(int index) |
int |
getBranchCount()
Get the number of branches in this container.
|
ASTList<Branch> |
getBranchList()
Get branch list.
|
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) |
SourceElement |
getLastElement() |
Statement |
getStatementAt(int index) |
int |
getStatementCount()
Get the number of statements in this container.
|
ASTList<LocalVariableDeclaration> |
getVariableDeclarations() |
VariableSpecification |
getVariableInScope(java.lang.String name) |
java.util.List<VariableSpecification> |
getVariablesInScope() |
boolean |
isDefinedScope() |
void |
makeParentRoleValid()
Make parent role valid.
|
void |
removeVariableFromScope(java.lang.String name) |
boolean |
replaceChild(ProgramElement p,
ProgramElement q)
Replace a single child in the current node.
|
void |
setBody(StatementBlock body)
Set body.
|
void |
setBranchList(ASTList<Branch> branches)
Set branch list.
|
void |
setDefinedScope(boolean defined) |
void |
setVariableDeclarations(ASTList<LocalVariableDeclaration> variableDeclarations) |
getASTParent, getStatementContainer, setStatementContainer
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 Exec()
public Exec(StatementBlock body)
body
- a statement block.public Exec(StatementBlock body, ASTList<Branch> branches)
body
- a statement block.branches
- a branch mutable list.protected Exec(Exec proto)
proto
- a Exec.public Exec deepClone()
deepClone
in interface SourceElement
deepClone
in interface Statement
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 StatementBlock getBody()
public void setBody(StatementBlock body)
body
- a statement block.public int getStatementCount()
getStatementCount
in interface StatementContainer
public Statement getStatementAt(int index)
getStatementAt
in interface StatementContainer
public ASTList<Branch> getBranchList()
public void setBranchList(ASTList<Branch> branches)
branches
- a branch mutable list.public int getBranchCount()
getBranchCount
in class BranchStatement
public Branch getBranchAt(int index)
getBranchAt
in class BranchStatement
public void accept(SourceVisitor v)
accept
in interface SourceElement
public boolean isDefinedScope()
isDefinedScope
in interface ScopeDefiningElement
public void setDefinedScope(boolean defined)
setDefinedScope
in interface ScopeDefiningElement
public ASTList<LocalVariableDeclaration> getVariableDeclarations()
public void setVariableDeclarations(ASTList<LocalVariableDeclaration> variableDeclarations)
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
Copyright © 2003-2019 The KeY-Project.