org.jruby.ast
Class ArgsNode

java.lang.Object
  extended byorg.jruby.ast.AbstractNode
      extended byorg.jruby.ast.ArgsNode
All Implemented Interfaces:
INode, java.io.Serializable

public class ArgsNode
extends AbstractNode

arguments for a function. this is used both in the function definition and in actual function calls

Author:
jpetersen
See Also:
Serialized Form

Constructor Summary
ArgsNode(ISourcePosition iPosition, int argsCount, IListNode optArgs, int restArg, BlockArgNode blockArgNode)
           
 
Method Summary
 void accept(INodeVisitor iVisitor)
          Accept for the visitor pattern.
 int getArgsCount()
          Gets the argsCount.
 BlockArgNode getBlockArgNode()
          Gets the blockArgNode.
 IListNode getOptArgs()
          Gets the optArgs.
 int getRestArg()
          Gets the restArg.
 
Methods inherited from class org.jruby.ast.AbstractNode
getPosition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArgsNode

public ArgsNode(ISourcePosition iPosition,
                int argsCount,
                IListNode optArgs,
                int restArg,
                BlockArgNode blockArgNode)
Parameters:
optArgs - Node describing the optional arguments This Block will contain assignments to locals (LAsgnNode)
restArg - index of the rest argument in the local table (the array argument prefixed by a * which collects all additional params) or -1 if there is none.
argsCount - number of regular arguments
blockArgNode - An optional block argument (&arg).
Method Detail

accept

public void accept(INodeVisitor iVisitor)
Accept for the visitor pattern.

Parameters:
iVisitor - the visitor

getArgsCount

public int getArgsCount()
Gets the argsCount.

Returns:
Returns a int

getOptArgs

public IListNode getOptArgs()
Gets the optArgs.

Returns:
Returns a IListNode

getRestArg

public int getRestArg()
Gets the restArg.

Returns:
Returns a int

getBlockArgNode

public BlockArgNode getBlockArgNode()
Gets the blockArgNode.

Returns:
Returns a BlockArgNode


Copyright © 2002 Jan Arne Petersen. All Rights Reserved.