org.jrubyparser.ast
Class CallNode

java.lang.Object
  extended by org.jrubyparser.ast.Node
      extended by org.jrubyparser.ast.CallNode
All Implemented Interfaces:
BlockAcceptingNode, IArgumentNode, INameMatchable, INameNode, ISourcePositionHolder

public class CallNode
extends Node
implements INameNode, IArgumentNode, BlockAcceptingNode

A method or operator call.


Field Summary
protected  Node iterNode
           
protected  String lexicalName
           
protected  String name
           
 
Constructor Summary
CallNode(SourcePosition position, Node receiverNode, String name, Node argsNode)
           
CallNode(SourcePosition position, Node receiverNode, String name, Node argsNode, Node iterNode)
           
 
Method Summary
 Object accept(NodeVisitor iVisitor)
          Accept for the visitor pattern.
 Node getArgs()
           
 Node getArgsNode()
          Deprecated. 
 Node getIter()
           
 Node getIterNode()
          Deprecated. 
 String getLexicalName()
          Get the name including any leading sigils.
 SourcePosition getLexicalNamePosition()
          The position of the name + any sigils that come with it.
 String getName()
          Gets the name.
 SourcePosition getNamePosition()
          The position of just the name part of the node.
 NodeType getNodeType()
           
 Node getReceiver()
           
 Node getReceiverNode()
          Deprecated. 
 boolean hasParens()
           
 boolean isNameMatch(String name)
           
 boolean isSame(Node node)
          Checks node for 'sameness' for diffing.
 void setArgs(Node argsNode)
           
 Node setArgsNode(Node argsNode)
          Deprecated. 
 void setHasParens(boolean hasParens)
           
 void setIter(Node iter)
           
 Node setIterNode(Node iterNode)
           
 void setLexicalName(String lexcicalName)
           
 void setName(String name)
          Set the name (name should not include sigils).
 void setReceiver(Node receiver)
           
 
Methods inherited from class org.jrubyparser.ast.Node
adopt, adopt, adoptUsingNodesPosition, childNodes, comparePositionWith, createList, getClosestIScope, getClosestModule, getGrandParent, getInlineComment, getInnermostIter, getMethodFor, getNodeAt, getNodeName, getOutermostIter, getParent, getPosition, getPositionIncludingComments, getPreviousComments, insertAfter, insertAll, insertBefore, insertNode, isBlockParameter, isDescendentOf, isLeaf, isMethodParameter, setParent, setPosition, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

iterNode

protected Node iterNode

name

protected String name

lexicalName

protected String lexicalName
Constructor Detail

CallNode

public CallNode(SourcePosition position,
                Node receiverNode,
                String name,
                Node argsNode)

CallNode

public CallNode(SourcePosition position,
                Node receiverNode,
                String name,
                Node argsNode,
                Node iterNode)
Method Detail

isSame

public boolean isSame(Node node)
Checks node for 'sameness' for diffing.

Overrides:
isSame in class Node
Parameters:
node - to be compared to
Returns:
Returns a boolean

getNodeType

public NodeType getNodeType()
Specified by:
getNodeType in class Node
Returns:
the nodeId

accept

public Object accept(NodeVisitor iVisitor)
Accept for the visitor pattern.

Specified by:
accept in class Node
Parameters:
iVisitor - the visitor

getIterNode

@Deprecated
public Node getIterNode()
Deprecated. 


getIter

public Node getIter()
Specified by:
getIter in interface BlockAcceptingNode

setIterNode

public Node setIterNode(Node iterNode)

setIter

public void setIter(Node iter)
Specified by:
setIter in interface BlockAcceptingNode

getArgsNode

@Deprecated
public Node getArgsNode()
Deprecated. 

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

Returns:
argsNode

getArgs

public Node getArgs()
Specified by:
getArgs in interface IArgumentNode

setArgsNode

@Deprecated
public Node setArgsNode(Node argsNode)
Deprecated. 

Set the argsNode.

Parameters:
argsNode - set the arguments for this node.

setArgs

public void setArgs(Node argsNode)
Specified by:
setArgs in interface IArgumentNode

hasParens

public boolean hasParens()
Specified by:
hasParens in interface IArgumentNode

setHasParens

public void setHasParens(boolean hasParens)
Specified by:
setHasParens in interface IArgumentNode

getLexicalName

public String getLexicalName()
Description copied from interface: INameNode
Get the name including any leading sigils.

Specified by:
getLexicalName in interface INameNode

getName

public String getName()
Gets the name. name is the name of the method called

Specified by:
getName in interface INameNode
Returns:
name

setName

public void setName(String name)
Description copied from interface: INameNode
Set the name (name should not include sigils).

Specified by:
setName in interface INameNode

setLexicalName

public void setLexicalName(String lexcicalName)

isNameMatch

public boolean isNameMatch(String name)
Specified by:
isNameMatch in interface INameMatchable

getReceiverNode

@Deprecated
public Node getReceiverNode()
Deprecated. 

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

Returns:
receiverNode

getReceiver

public Node getReceiver()

setReceiver

public void setReceiver(Node receiver)

getNamePosition

public SourcePosition getNamePosition()
Description copied from interface: INameNode
The position of just the name part of the node.

Specified by:
getNamePosition in interface INameNode

getLexicalNamePosition

public SourcePosition getLexicalNamePosition()
Description copied from interface: INameNode
The position of the name + any sigils that come with it.

Specified by:
getLexicalNamePosition in interface INameNode


Copyright © 2013. All Rights Reserved.