getExpressionAt(int index) Return the expression at the specified index in this node's
"virtual" expression array.
Parameters: index - an index for a expression.
getTypeReferenceAt(int index) Return the type reference at the specified index in this node's
"virtual" statement array.
Parameters: index - an index for a type reference.
makeParentRoleValid() Ensures that each child has "this" as syntactical parent.
public boolean
replaceChild(ProgramElement p, ProgramElement q) Replace a single child in the current node.
The child to replace is matched by identity and hence must be known
exactly.
public MethodBodyStatement(TypeReference bodySource, Expression resultVar, MethodReference methRef)(Code)
Construct a method body shortcut
Parameters: bodySource - exact class where the body is declared Parameters: resultVar - the Expression naming the variable to whichthe result of the mthod is assigned Parameters: methRef - MethodReference that represents the call
Returns the child at the specified index in this node's "virtual"
child array
Parameters: index - an index into this node's "virtual" child array the program element at the given position exception: ArrayIndexOutOfBoundsException - if index is outof bounds
Returns the number of children of this node.
an int giving the number of children of this node
getChildPositionCode
public int getChildPositionCode(ProgramElement child)(Code)
getExpressionAt
public Expression getExpressionAt(int index)(Code)
Return the expression at the specified index in this node's
"virtual" expression array.
Parameters: index - an index for a expression. the expression with the given index. exception: ArrayIndexOutOfBoundsException - if index is outof bounds.
Finds the source element that occurs first in the source.
the last source element in the syntactical representation ofthis element, may be equals to this element.
Finds the source element that occurs last in the source.
the last source element in the syntactical representation ofthis element, may be equals to this element.
public StatementContainer getStatementContainer()(Code)
getTypeReferenceAt
public TypeReference getTypeReferenceAt(int index)(Code)
Return the type reference at the specified index in this node's
"virtual" statement array.
Parameters: index - an index for a type reference. the type reference with the given index. exception: ArrayIndexOutOfBoundsException - if index is outof bounds.
Ensures that each child has "this" as syntactical parent.
replaceChild
public boolean replaceChild(ProgramElement p, ProgramElement q)(Code)
Replace a single child in the current node.
The child to replace is matched by identity and hence must be known
exactly. The replacement element can be null - in that case, the child
is effectively removed.
The parent role of the new child is validated, while the
parent link of the replaced child is left untouched.
Parameters: p - the old child. Parameters: q - the new child. true if a replacement has occured, false otherwise. exception: ClassCastException - if the new child cannot take overthe role of the old one.
setArguments
public void setArguments(ExpressionMutableList arguments)(Code)
setBodySource
public void setBodySource(TypeReference bodySource)(Code)
Set the exact Class the denoted method body is from.