| de.uka.ilkd.key.java.expression.operator.TypeOperator de.uka.ilkd.key.java.expression.operator.New
New | public class New extends TypeOperator implements ConstructorReference,ExpressionStatement,ReferencePrefix,ReferenceSuffix,TypeDeclarationContainer(Code) | | The object allocation operator.
There are two variants for New:
- Class constructor call
new XYZ(a1, ..., an)
if getType() instanceof UserType
- Anonymous Inner Class definition and construction
new XYZ(a1, ..., an)
{ m1, ..., mk }
if getType() instanceof UserType && getClassDeclaration() != null
The access path is null in most cases, except when an inner class
constructor is invoked from an outer instance.
|
New | public New(ExtList children, ReferencePrefix rp)(Code) | | Constructor for the transformation of COMPOST ASTs to KeY.
Parameters: children - the children of this AST element as KeY classes.a ClassDeclaration (in case of an anonymous class decl)a TypeReference (the referred type)2 of Expression (the first Expression as left handside, the second as right hand side), Comments; does NOT contain: a ReferencePrefix for the constructoras it might be mixed up with the TypeReference Parameters: rp - a ReferencePrefix as access path for the constructor |
New | public New(ExtList children, ReferencePrefix rp, PositionInfo pi)(Code) | | Constructor for the transformation of COMPOST ASTs to KeY.
Parameters: children - the children of this AST element as KeY classes.a ClassDeclaration (in case of an anonymous class decl)a TypeReference (the referred type)2 of Expression (the first Expression as left handside, the second as right hand side), Comments; does NOT contain: a ReferencePrefix for the constructoras it might be mixed up with the TypeReference Parameters: rp - a ReferencePrefix as access path for the constructor |
New | public New(Expression[] arguments, TypeReference type, ReferencePrefix rp)(Code) | | Constructor for the transformation of COMPOST ASTs to KeY.
Parameters: type - a TypeReference (the referred type) Parameters: rp - a ReferencePrefix as access path for the constructor |
getArity | public int getArity()(Code) | | Get arity.
the int value. |
getChildAt | public ProgramElement getChildAt(int index)(Code) | | 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 |
getChildCount | public int getChildCount()(Code) | | Returns the number of children of this node.
an int giving the number of children of this node |
getClassDeclaration | public ClassDeclaration getClassDeclaration()(Code) | | Get class declaration.
the class declaration. |
getNotation | public int getNotation()(Code) | | Get notation.
the int value. |
getPrecedence | public int getPrecedence()(Code) | | Get precedence.
the int value. |
getReferencePrefix | public ReferencePrefix getReferencePrefix()(Code) | | Get reference prefix.
the reference prefix. |
getTypeDeclarationCount | public int getTypeDeclarationCount()(Code) | | Get the number of type declarations in this container.
the number of type declarations. |
visit | public void visit(Visitor v)(Code) | | calls the corresponding method of a visitor in order to
perform some action/transformation on this element
Parameters: v - the Visitor |
|
|