public class RKeYMetaConstruct extends JavaStatement implements StatementContainer, KeYRecoderExtension
ProgramElement.TreeStructure
SourceElement.Position
Modifier and Type | Field and Description |
---|---|
protected Statement |
child
Child
|
protected java.lang.String |
name |
private static long |
serialVersionUID |
private java.util.List<SVWrapper> |
sv
schemavariable needed by meta construct
|
parent
comments
factory
STRUCTURAL_EQUALITY, STRUCTURAL_HASH_CODE
Modifier | Constructor and Description |
---|---|
|
RKeYMetaConstruct() |
protected |
RKeYMetaConstruct(RKeYMetaConstruct proto)
Loop statement.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(SourceVisitor v) |
void |
addSV(SVWrapper svw) |
JavaStatement |
deepClone() |
Statement |
getChild()
Get child.
|
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 child0) |
SVWrapper |
getFirstSV()
first schemavariable needed by the metaconstruct
|
java.lang.String |
getName()
returns a String name of this meta construct.
|
Statement |
getStatementAt(int index) |
int |
getStatementCount()
Get the number of statements in this container.
|
ProgramSV[] |
getSV() |
void |
makeParentRoleValid()
Make parent role valid.
|
boolean |
replaceChild(ProgramElement p,
ProgramElement q)
Replace a single child in the current node.
|
void |
setChild(Statement statement)
Set child.
|
void |
setName(java.lang.String s)
sets a String name of this meta construct like 'unwind-loop'
|
void |
setSV(SVWrapper sv)
first schemavariable needed by the metaconstruct
|
getASTParent, getStatementContainer, setStatementContainer
getIndexOfChild, getIndexOfChild, getRoleOfChild, makeAllParentRolesValid, validateAll
getComments, setComments, validate
getEndPosition, getFactory, getFirstElement, getLastElement, 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, getLastElement, getRelativePosition, getStartPosition, setEndPosition, setRelativePosition, setStartPosition, toSource
validate
private static final long serialVersionUID
protected Statement child
protected java.lang.String name
private java.util.List<SVWrapper> sv
protected RKeYMetaConstruct(RKeYMetaConstruct proto)
proto
- a loop statement.public RKeYMetaConstruct()
public void makeParentRoleValid()
makeParentRoleValid
in interface NonTerminalProgramElement
makeParentRoleValid
in class JavaNonTerminalProgramElement
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 child0)
getChildPositionCode
in interface NonTerminalProgramElement
public boolean replaceChild(ProgramElement p, ProgramElement q)
replaceChild
in interface NonTerminalProgramElement
p
- the old child.q
- the new child.java.lang.ClassCastException
- if the new child cannot take over
the role of the old one.public void setName(java.lang.String s)
s
- the Stringpublic java.lang.String getName()
public Statement getChild()
public void setChild(Statement statement)
statement
- a statement.public void setSV(SVWrapper sv)
sv
- an SVWrapper containing the first Schemavariablepublic void addSV(SVWrapper svw)
public SVWrapper getFirstSV()
public ProgramSV[] getSV()
public int getStatementCount()
getStatementCount
in interface StatementContainer
public Statement getStatementAt(int index)
getStatementAt
in interface StatementContainer
public void accept(SourceVisitor v)
accept
in interface SourceElement
public JavaStatement deepClone()
deepClone
in interface SourceElement
deepClone
in interface Statement