jltools.ext.jl.ast
Class QualifiedNew_c
java.lang.Object
|
+--jltools.ext.jl.ast.Node_c
|
+--jltools.ext.jl.ast.Expr_c
|
+--jltools.ext.jl.ast.AbstractNew_c
|
+--jltools.ext.jl.ast.QualifiedNew_c
- All Implemented Interfaces:
- java.lang.Cloneable, Copy, Expr, Node, Prefix, QualifiedNew, Receiver, java.io.Serializable, Typed
- public class QualifiedNew_c
- extends AbstractNew_c
- implements QualifiedNew
A QualifiedNew is an immutable representation of the use of the
qualified new operator to create a new instance of a member
class. In addition to the type of the class being created, a
QualifiedNew has a list of arguments to be passed to the
constructor of the object and an optional ClassBody used to
support anonymous classes. It is also preceded by an qualifier expression
which specifies the context in which the object is being created.
- See Also:
- Serialized Form
| Fields inherited from class jltools.ext.jl.ast.Expr_c |
type |
| Methods inherited from class jltools.ext.jl.ast.AbstractNew_c |
arguments, body, buildTypesOverride_, constructorInstance, constructorInstance, disambiguateOverride_, disambiguateTypesOverride_, exceptionCheck_, foldConstantsOverride_, setArguments, setBody, translateEpilogue, typeCheckBody, typeCheckEpilogue, visitChildren |
| Methods inherited from class jltools.ext.jl.ast.Node_c |
buildTypes, buildTypesOverride, copy, disambiguate_, disambiguate, disambiguateOverride, disambiguateTypes_, disambiguateTypes, disambiguateTypesOverride, enterScope, exceptionCheck, exceptionCheckOverride_, exceptionCheckOverride, ext, ext, foldConstants_, foldConstants, foldConstantsOverride, leaveScope, position, position, reconstructTypes, translate, translateBlock, translateSubstmt, typeCheck_, typeCheck, typeCheckOverride, visit, visitList |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jltools.ast.Node |
buildTypes_, buildTypesOverride_, copy, disambiguate_, disambiguateOverride_, disambiguateTypes_, disambiguateTypesOverride_, dump, enterScope, exceptionCheck_, exceptionCheckOverride_, ext, ext, foldConstants_, foldConstantsOverride_, leaveScope, position, position, reconstructTypes_, typeCheck_, visit, visitChildren |
| Methods inherited from interface jltools.ast.Typed |
type |
qualifier
protected Expr qualifier
objectType
protected TypeNode objectType
QualifiedNew_c
public QualifiedNew_c(Ext ext,
Position pos,
Expr qualifier,
TypeNode objectType,
java.util.List args,
ClassBody body)
qualifier
public Expr qualifier()
- Get the qualifier expression of the allocation.
- Specified by:
qualifier in interface QualifiedNew
qualifier
public QualifiedNew qualifier(Expr qualifier)
- Set the qualifier expression of the allocation.
- Specified by:
qualifier in interface QualifiedNew
objectType
public TypeNode objectType()
- Get the name of the member class of the qualifier expression's type.
- Specified by:
objectType in interface QualifiedNew
objectType
public QualifiedNew objectType(TypeNode objectType)
- Set the name of the member class of the qualifier expression's type.
- Specified by:
objectType in interface QualifiedNew
arguments
public QualifiedNew arguments(java.util.List arguments)
- Set the arguments of the expression.
- Specified by:
arguments in interface QualifiedNew
body
public QualifiedNew body(ClassBody body)
- Set the body of the expression.
- Specified by:
body in interface QualifiedNew
reconstruct
protected QualifiedNew_c reconstruct(Expr qualifier,
java.util.List arguments,
ClassBody body)
- Reconstruct the expression.
visitNonBodyChildren
protected AbstractNew_c visitNonBodyChildren(NodeVisitor v)
- Visit the children of the expression, except the body.
- Overrides:
visitNonBodyChildren in class AbstractNew_c
typeCheckOverride_
public Node typeCheckOverride_(TypeChecker tc)
throws SemanticException
- Type check the expression.
- Specified by:
typeCheckOverride_ in interface Node- Overrides:
typeCheckOverride_ in class AbstractNew_c
- Following copied from interface:
jltools.ast.Node
- Parameters:
tc - The type checking visitor.
toString
public java.lang.String toString()
- Overrides:
toString in class Node_c
translate_
public void translate_(CodeWriter w,
Translator tr)
- Write the expression to an output file.
- Specified by:
translate_ in interface Node- Overrides:
translate_ in class AbstractNew_c
- Following copied from interface:
jltools.ast.Node
- Parameters:
w - The code writer to which to write.tr - The translation pass. This is not a visitor.