Package org.jruby.ast

Class FCallNode

java.lang.Object
org.jruby.ast.Node
org.jruby.ast.FCallNode
All Implemented Interfaces:
BlockAcceptingNode, CanRaise, IArgumentNode, INameNode

public class FCallNode extends Node implements INameNode, IArgumentNode, BlockAcceptingNode, CanRaise
Represents a method call with self as an implicit receiver.
  • Field Details

    • argsNode

      protected Node argsNode
    • iterNode

      protected Node iterNode
  • Constructor Details

    • FCallNode

      public FCallNode(int line, RubySymbol name)
    • FCallNode

      public FCallNode(int line, RubySymbol name, Node argsNode, Node iterNode)
  • Method Details

    • getNodeType

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

      public <T> T accept(NodeVisitor<T> iVisitor)
      Accept for the visitor pattern.
      Specified by:
      accept in class Node
      Parameters:
      iVisitor - the visitor
    • getIterNode

      public Node getIterNode()
      Get the node that represents a block or a block variable.
      Specified by:
      getIterNode in interface BlockAcceptingNode
    • setIterNode

      public Node setIterNode(Node iterNode)
      Specified by:
      setIterNode in interface BlockAcceptingNode
    • getArgsNode

      public Node getArgsNode()
      Gets the argsNode.
      Specified by:
      getArgsNode in interface IArgumentNode
      Returns:
      Returns a Node
    • setArgsNode

      public Node setArgsNode(Node argsNode)
      Set the argsNode. Changes to parser means fcall is made before actual args are associated with fcall so we need a setter.
      Specified by:
      setArgsNode in interface IArgumentNode
    • getName

      public RubySymbol getName()
      Gets the name.
      Specified by:
      getName in interface INameNode
      Returns:
      Returns a String
    • childNodes

      public List<Node> childNodes()
      Specified by:
      childNodes in class Node