polyglot.ast
Interface Call

All Superinterfaces:
java.lang.Cloneable, Copy, Expr, JL, Node, NodeOps, Prefix, ProcedureCall, Receiver, Term, Typed
All Known Implementing Classes:
Call_c

public interface Call
extends Expr, ProcedureCall

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.


Method Summary
 java.util.List arguments()
          The call's actual arguments.
 ProcedureCall arguments(java.util.List arguments)
          Set the call's actual arguments.
 boolean isTargetImplicit()
          Indicates if the target of this call is implicit, that is, was not specified explicitly in the syntax.
 MethodInstance methodInstance()
          The type object of the method we are calling.
 Call methodInstance(MethodInstance mi)
          Set the type object of the method we are calling.
 java.lang.String name()
          The name of the method to call.
 Call name(java.lang.String name)
          Set the name of the method to call.
 Receiver target()
          The call's target object.
 Call target(Receiver target)
          Set the call's target.
 Call targetImplicit(boolean targetImplicit)
          Set whether the target of this call is implicit.
 
Methods inherited from interface polyglot.ast.Expr
constantValue, isConstant, precedence, printSubExpr, printSubExpr, type
 
Methods inherited from interface polyglot.ast.Node
childExpectedType, del, del, dump, ext, ext, ext, ext, position, position, visit, visitChild, visitEdge, visitList
 
Methods inherited from interface polyglot.ast.JL
init, node
 
Methods inherited from interface polyglot.ast.NodeOps
addDecls, addMembers, addMembersEnter, buildTypes, buildTypesEnter, disambiguate, disambiguateEnter, enterScope, enterScope, exceptionCheck, exceptionCheckEnter, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, visitChildren
 
Methods inherited from interface polyglot.util.Copy
copy
 
Methods inherited from interface polyglot.ast.Typed
type
 
Methods inherited from interface polyglot.ast.Term
acceptCFG, entry, exceptions, exceptions, reachable, reachable
 
Methods inherited from interface polyglot.ast.ProcedureCall
procedureInstance
 
Methods inherited from interface polyglot.ast.Term
acceptCFG, entry, exceptions, exceptions, reachable, reachable
 

Method Detail

target

Receiver target()
The call's target object.


target

Call target(Receiver target)
Set the call's target.


name

java.lang.String name()
The name of the method to call.


name

Call name(java.lang.String name)
Set the name of the method to call.


isTargetImplicit

boolean isTargetImplicit()
Indicates if the target of this call is implicit, that is, was not specified explicitly in the syntax.

Returns:
boolean indicating if the target of this call is implicit

targetImplicit

Call targetImplicit(boolean targetImplicit)
Set whether the target of this call is implicit.


arguments

java.util.List arguments()
The call's actual arguments.

Specified by:
arguments in interface ProcedureCall
Returns:
A list of Expr.

arguments

ProcedureCall arguments(java.util.List arguments)
Set the call's actual arguments.

Specified by:
arguments in interface ProcedureCall
Parameters:
arguments - A list of Expr.

methodInstance

MethodInstance methodInstance()
The type object of the method we are calling. This is, generally, only valid after the type-checking pass.


methodInstance

Call methodInstance(MethodInstance mi)
Set the type object of the method we are calling.