jltools.ext.jl.ast
Class ConstructorCall_c

java.lang.Object
  |
  +--jltools.ext.jl.ast.Node_c
        |
        +--jltools.ext.jl.ast.Stmt_c
              |
              +--jltools.ext.jl.ast.ConstructorCall_c
All Implemented Interfaces:
java.lang.Cloneable, ConstructorCall, Copy, Node, java.io.Serializable, Stmt

public class ConstructorCall_c
extends Stmt_c
implements ConstructorCall

A ConstructorCall is an immutable representation of a direct call to a constructor of a class in the form of super(...) or this(...).

See Also:
Serialized Form

Inner classes inherited from class jltools.ext.jl.ast.Node_c
Node_c.StringCodeWriter
 
Inner classes inherited from class jltools.ast.ConstructorCall
ConstructorCall.Kind
 
Field Summary
protected  java.util.List arguments
           
protected  ConstructorInstance ci
           
protected  jltools.ext.jl.ast.Kind kind
           
protected  Expr qualifier
           
 
Fields inherited from class jltools.ext.jl.ast.Node_c
ext, position
 
Fields inherited from interface jltools.ast.ConstructorCall
SUPER, THIS
 
Constructor Summary
ConstructorCall_c(Ext ext, Position pos, jltools.ext.jl.ast.Kind kind, Expr qualifier, java.util.List arguments)
           
 
Method Summary
 java.util.List arguments()
          Get the arguments of the constructor call.
 ConstructorCall arguments(java.util.List arguments)
          Set the arguments of the constructor call.
 ConstructorInstance constructorInstance()
          Get the constructor we are calling.
 ConstructorCall constructorInstance(ConstructorInstance ci)
          Set the constructor we are calling.
 jltools.ext.jl.ast.Kind kind()
          Get the kind of the constructor call.
 ConstructorCall kind(jltools.ext.jl.ast.Kind kind)
          Set the kind of the constructor call.
 Expr qualifier()
          Get the qualifier of the constructor call.
 ConstructorCall qualifier(Expr qualifier)
          Set the qualifier of the constructor call.
protected  ConstructorCall_c reconstruct(Expr qualifier, java.util.List arguments)
          Reconstruct the constructor call.
 java.lang.String toString()
           
 void translate_(CodeWriter w, Translator tr)
          Write the call to an output file.
 Node typeCheck_(TypeChecker tc)
          Type check the call.
 Node visitChildren(NodeVisitor v)
          Visit the children of the call.
 
Methods inherited from class jltools.ext.jl.ast.Node_c
buildTypes_, buildTypes, buildTypesOverride_, buildTypesOverride, copy, disambiguate_, disambiguate, disambiguateOverride_, disambiguateOverride, disambiguateTypes_, disambiguateTypes, disambiguateTypesOverride_, disambiguateTypesOverride, dump, enterScope, exceptionCheck_, exceptionCheck, exceptionCheckOverride_, exceptionCheckOverride, ext, ext, foldConstants_, foldConstants, foldConstantsOverride_, foldConstantsOverride, leaveScope, position, position, reconstructTypes_, reconstructTypes, translate, translateBlock, translateSubstmt, typeCheck, typeCheckOverride_, 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.ConstructorCall
kind
 
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_, typeCheckOverride_, visit
 

Field Detail

kind

protected jltools.ext.jl.ast.Kind kind

qualifier

protected Expr qualifier

arguments

protected java.util.List arguments

ci

protected ConstructorInstance ci
Constructor Detail

ConstructorCall_c

public ConstructorCall_c(Ext ext,
                         Position pos,
                         jltools.ext.jl.ast.Kind kind,
                         Expr qualifier,
                         java.util.List arguments)
Method Detail

qualifier

public Expr qualifier()
Get the qualifier of the constructor call.
Specified by:
qualifier in interface ConstructorCall

qualifier

public ConstructorCall qualifier(Expr qualifier)
Set the qualifier of the constructor call.
Specified by:
qualifier in interface ConstructorCall

kind

public jltools.ext.jl.ast.Kind kind()
Get the kind of the constructor call.
Specified by:
kind in interface ConstructorCall

kind

public ConstructorCall kind(jltools.ext.jl.ast.Kind kind)
Set the kind of the constructor call.

arguments

public java.util.List arguments()
Get the arguments of the constructor call.
Specified by:
arguments in interface ConstructorCall

arguments

public ConstructorCall arguments(java.util.List arguments)
Set the arguments of the constructor call.
Specified by:
arguments in interface ConstructorCall

constructorInstance

public ConstructorInstance constructorInstance()
Get the constructor we are calling.
Specified by:
constructorInstance in interface ConstructorCall

constructorInstance

public ConstructorCall constructorInstance(ConstructorInstance ci)
Set the constructor we are calling.

reconstruct

protected ConstructorCall_c reconstruct(Expr qualifier,
                                        java.util.List arguments)
Reconstruct the constructor call.

visitChildren

public Node visitChildren(NodeVisitor v)
Visit the children of the call.
Specified by:
visitChildren in interface Node
Overrides:
visitChildren in class Node_c

typeCheck_

public Node typeCheck_(TypeChecker tc)
                throws SemanticException
Type check the call.
Specified by:
typeCheck_ in interface Node
Overrides:
typeCheck_ in class Node_c

toString

public java.lang.String toString()
Overrides:
toString in class Node_c

translate_

public void translate_(CodeWriter w,
                       Translator tr)
Write the call to an output file.
Specified by:
translate_ in interface Node
Overrides:
translate_ in class Node_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.