public class RMethodBodyStatement extends JavaStatement implements KeYRecoderExtension, TypeReferenceContainer, ExpressionContainer, NamedProgramElement
NamedModelElement.LexicalOrder
ProgramElement.TreeStructure
SourceElement.Position
Modifier and Type | Field and Description |
---|---|
private ASTList<Expression> |
arguments |
private TypeReference |
bodySource |
private Identifier |
methodName |
private ReferencePrefix |
methodReferencePrefix |
private ProgramVariableSVWrapper |
resultVar |
private static long |
serialVersionUID |
parent
comments
factory
LEXICAL_ORDER
STRUCTURAL_EQUALITY, STRUCTURAL_HASH_CODE
Constructor and Description |
---|
RMethodBodyStatement(TypeReference typeRef,
ProgramVariableSVWrapper resVar,
MethodReference mr) |
RMethodBodyStatement(TypeReference typeRef,
ProgramVariableSVWrapper resVar,
ReferencePrefix prefix,
Identifier methodName,
ASTList<Expression> arguments) |
Modifier and Type | Method and Description |
---|---|
void |
accept(SourceVisitor visitor) |
RMethodBodyStatement |
deepClone() |
TypeReference |
getBodySource() |
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() |
Identifier |
getIdentifier() |
MethodReference |
getMethodReference() |
java.lang.String |
getName() |
ProgramVariableSVWrapper |
getResultVar() |
TypeReference |
getTypeReferenceAt(int index) |
int |
getTypeReferenceCount() |
void |
makeParentRoleValid()
Ensures that each child has "this" as syntactical parent.
|
boolean |
replaceChild(ProgramElement p,
ProgramElement q)
Replace a single child in the current node.
|
void |
setIdentifier(Identifier methodName) |
void |
setMethodReference(MethodReference methRef)
Set the MethodReference that caused this call.
|
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
private static final long serialVersionUID
private TypeReference bodySource
private ProgramVariableSVWrapper resultVar
private ReferencePrefix methodReferencePrefix
private Identifier methodName
private ASTList<Expression> arguments
public RMethodBodyStatement(TypeReference typeRef, ProgramVariableSVWrapper resVar, MethodReference mr)
public RMethodBodyStatement(TypeReference typeRef, ProgramVariableSVWrapper resVar, ReferencePrefix prefix, Identifier methodName, ASTList<Expression> arguments)
public void accept(SourceVisitor visitor)
accept
in interface SourceElement
public RMethodBodyStatement deepClone()
deepClone
in interface SourceElement
deepClone
in interface Statement
public void setMethodReference(MethodReference methRef)
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 void makeParentRoleValid()
makeParentRoleValid
in interface NonTerminalProgramElement
makeParentRoleValid
in class JavaNonTerminalProgramElement
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 TypeReference getBodySource()
public ProgramVariableSVWrapper getResultVar()
public MethodReference getMethodReference()
public int getTypeReferenceCount()
getTypeReferenceCount
in interface TypeReferenceContainer
public TypeReference getTypeReferenceAt(int index)
getTypeReferenceAt
in interface TypeReferenceContainer
public int getExpressionCount()
getExpressionCount
in interface ExpressionContainer
public Expression getExpressionAt(int index)
getExpressionAt
in interface ExpressionContainer
public Identifier getIdentifier()
getIdentifier
in interface NamedProgramElement
public void setIdentifier(Identifier methodName)
setIdentifier
in interface NamedProgramElement
public java.lang.String getName()
getName
in interface NamedModelElement