Top Description Fields Constructors Methods
org.jruby.ast

public Class CallNode

extends Node
implements INameNode, IArgumentNode, BlockAcceptingNode, CanRaise
Class Inheritance
All Implemented Interfaces
org.jruby.ast.CanRaise, org.jruby.ast.BlockAcceptingNode, org.jruby.ast.IArgumentNode, org.jruby.ast.types.INameNode
Known Direct Subclasses
org.jruby.ast.visitor.OperatorCallNode
Imports
java.util.List, org.jruby.RubySymbol, org.jruby.ast.types.INameNode, org.jruby.ast.visitor.NodeVisitor

A method or operator call.

Field Summary

Modifier and TypeField and Description
private Node
private final boolean
protected Node
private RubySymbol
private final Node
Inherited from org.jruby.ast.Node:
containsVariableAssignmentEMPTY_LISTnewline

Constructor Summary

AccessConstructor and Description
public
CallNode(int line, Node receiverNode, RubySymbol name, Node argsNode, Node iterNode, boolean isLazy)

Method Summary

Modifier and TypeMethod and Description
public <T> T
accept(NodeVisitor<T>
the visitor
iVisitor
)

Implements abstract org.jruby.ast.Node.accept.

Accept for the visitor pattern.

public List<Node>
public Node

Returns:

argsNode
getArgsNode
()

Implements org.jruby.ast.IArgumentNode.getArgsNode.

Gets the argsNode representing the method's arguments' value for this call.

public Node
public RubySymbol

Returns:

name
getName
()

Implements org.jruby.ast.types.INameNode.getName.

Gets the name.

public NodeType
public Node

Returns:

receiverNode
getReceiverNode
()

Gets the receiverNode.

public boolean

Returns:

true if so.
isLazy
()

Is this call lazily execute because it was on right hand side of the lonely (&.) operator?

public Node
setArgsNode(Node
set the arguments for this node.
argsNode
)

Implements org.jruby.ast.IArgumentNode.setArgsNode.

Set the argsNode.

public Node
protected String
toStringInternal()

Overrides org.jruby.ast.Node.toStringInternal.

Overridden by nodes that have additional internal state to be displated in toString.

Inherited from org.jruby.ast.Node:
containsVariableAssignmentcreateListcreateListcreateListcreateListexecutesOncegetFilegetLinegetNodeNameisNewlineisNilneedsDefinitionChecksetLinesetNewlinetoStringtoStringtoStringExtraInfounsetNewline

Field Detail

argsNodeback to summary
private Node argsNode
isLazyback to summary
private final boolean isLazy
iterNodeback to summary
protected Node iterNode
nameback to summary
private RubySymbol name
receiverNodeback to summary
private final Node receiverNode

Constructor Detail

CallNodeback to summary
public CallNode(int line, Node receiverNode, RubySymbol name, Node argsNode, Node iterNode, boolean isLazy)

Method Detail

acceptback to summary
public <T> T accept(NodeVisitor<T> iVisitor)

Implements abstract org.jruby.ast.Node.accept.

Accept for the visitor pattern.

Parameters
iVisitor:NodeVisitor<T>

the visitor

childNodesback to summary
public List<Node> childNodes()

Implements abstract org.jruby.ast.Node.childNodes.

getArgsNodeback to summary
public Node getArgsNode()

Implements org.jruby.ast.IArgumentNode.getArgsNode.

Gets the argsNode representing the method's arguments' value for this call.

Returns:Node

argsNode

getIterNodeback to summary
public Node getIterNode()

Implements org.jruby.ast.BlockAcceptingNode.getIterNode.

getNameback to summary
public RubySymbol getName()

Implements org.jruby.ast.types.INameNode.getName.

Gets the name. name is the name of the method called

Returns:RubySymbol

name

getNodeTypeback to summary
public NodeType getNodeType()

Implements abstract org.jruby.ast.Node.getNodeType.

Returns:NodeType

Doc from org.jruby.ast.Node.getNodeType.

the nodeId

getReceiverNodeback to summary
public Node getReceiverNode()

Gets the receiverNode. receiverNode is the object on which the method is being called

Returns:Node

receiverNode

isLazyback to summary
public boolean isLazy()

Is this call lazily execute because it was on right hand side of the lonely (&.) operator?

Returns:boolean

true if so.

setArgsNodeback to summary
public Node setArgsNode(Node argsNode)

Implements org.jruby.ast.IArgumentNode.setArgsNode.

Set the argsNode. This is for re-writer and not general interpretation.

Parameters
argsNode:Node

set the arguments for this node.

setIterNodeback to summary
public Node setIterNode(Node iterNode)

Implements org.jruby.ast.BlockAcceptingNode.setIterNode.

toStringInternalback to summary
protected String toStringInternal()

Overrides org.jruby.ast.Node.toStringInternal.

Doc from org.jruby.ast.Node.toStringInternal.

Overridden by nodes that have additional internal state to be displated in toString.

For nodes that have it, name is handled separately, by implementing INameNode.

Child nodes are handled via iterating #childNodes.

Returns:String

A string representing internal node state, or null if none.

Annotations
@Override