jltools.ext.jl.ast
Class Call_c

java.lang.Object
  |
  +--jltools.ext.jl.ast.Node_c
        |
        +--jltools.ext.jl.ast.Expr_c
              |
              +--jltools.ext.jl.ast.Call_c
All Implemented Interfaces:
Call, java.lang.Cloneable, Copy, Expr, Node, Prefix, Receiver, java.io.Serializable, Typed

public class Call_c
extends Expr_c
implements Call

A Call is an immutable representation of a Java method call. It consists of a method name and a list of arguments. It may also have either a Type upon which the method is being called or an expression upon which the method is being called.

See Also:
Serialized Form

Inner classes inherited from class jltools.ext.jl.ast.Node_c
Node_c.StringCodeWriter
 
Field Summary
protected  java.util.List arguments
           
protected  MethodInstance mi
           
protected  java.lang.String name
           
protected  Receiver target
           
 
Fields inherited from class jltools.ext.jl.ast.Expr_c
type
 
Fields inherited from class jltools.ext.jl.ast.Node_c
ext, position
 
Constructor Summary
Call_c(Ext ext, Position pos, Receiver target, java.lang.String name, java.util.List arguments)
           
 
Method Summary
 java.util.List arguments()
          Get the arguments of the call.
 Call arguments(java.util.List arguments)
          Set the arguments of the call.
 Node exceptionCheck_(ExceptionChecker ec)
          Check exceptions thrown by the call.
 MethodInstance methodInstance()
          Get the method instance of the call.
 Call methodInstance(MethodInstance mi)
          Set the method instance of the call.
 java.lang.String name()
          Get the name of the call.
 Call name(java.lang.String name)
          Set the name of the call.
 Precedence precedence()
          Get the precedence of the call.
protected  Call_c reconstruct(Receiver target, java.util.List arguments)
          Reconstruct the call.
 Receiver target()
          Get the target object or type of the call.
 Call target(Receiver target)
          Set the target object or type of the call.
 java.lang.String toString()
           
 void translate_(CodeWriter w, Translator tr)
          Write the expression 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.Expr_c
buildTypes_, dump, reconstructTypes_, translateSubexpr, type, type
 
Methods inherited from class jltools.ext.jl.ast.Node_c
buildTypes, buildTypesOverride_, buildTypesOverride, copy, disambiguate_, disambiguate, disambiguateOverride_, disambiguateOverride, disambiguateTypes_, disambiguateTypes, disambiguateTypesOverride_, disambiguateTypesOverride, enterScope, exceptionCheck, exceptionCheckOverride_, exceptionCheckOverride, ext, ext, foldConstants_, foldConstants, foldConstantsOverride_, foldConstantsOverride, leaveScope, position, position, 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.Expr
type
 
Methods inherited from interface jltools.ast.Node
buildTypes_, buildTypesOverride_, copy, disambiguate_, disambiguateOverride_, disambiguateTypes_, disambiguateTypesOverride_, dump, enterScope, exceptionCheckOverride_, ext, ext, foldConstants_, foldConstantsOverride_, leaveScope, position, position, reconstructTypes_, typeCheckOverride_, visit
 
Methods inherited from interface jltools.ast.Typed
type
 

Field Detail

target

protected Receiver target

name

protected java.lang.String name

arguments

protected java.util.List arguments

mi

protected MethodInstance mi
Constructor Detail

Call_c

public Call_c(Ext ext,
              Position pos,
              Receiver target,
              java.lang.String name,
              java.util.List arguments)
Method Detail

precedence

public Precedence precedence()
Get the precedence of the call.
Specified by:
precedence in interface Expr
Overrides:
precedence in class Expr_c

target

public Receiver target()
Get the target object or type of the call.
Specified by:
target in interface Call

target

public Call target(Receiver target)
Set the target object or type of the call.
Specified by:
target in interface Call

name

public java.lang.String name()
Get the name of the call.
Specified by:
name in interface Call

name

public Call name(java.lang.String name)
Set the name of the call.
Specified by:
name in interface Call

methodInstance

public MethodInstance methodInstance()
Get the method instance of the call.
Specified by:
methodInstance in interface Call

methodInstance

public Call methodInstance(MethodInstance mi)
Set the method instance of the call.
Specified by:
methodInstance in interface Call

arguments

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

arguments

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

reconstruct

protected Call_c reconstruct(Receiver target,
                             java.util.List arguments)
Reconstruct the 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

exceptionCheck_

public Node exceptionCheck_(ExceptionChecker ec)
                     throws SemanticException
Check exceptions thrown by the call.
Specified by:
exceptionCheck_ in interface Node
Overrides:
exceptionCheck_ 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 expression 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.