|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.ast.Node
org.jruby.ast.ArgsNode
public class ArgsNode
Arguments for a function definition.
Field Summary |
---|
Fields inherited from class org.jruby.ast.Node |
---|
EMPTY_COMMENT_LIST, INVALID_POSITION, nodeId |
Constructor Summary | |
---|---|
ArgsNode(ISourcePosition position,
ListNode arguments,
ListNode optionalArguments,
int restArguments,
ArgumentNode restArgNode,
BlockArgNode blockArgNode)
|
Method Summary | |
---|---|
Instruction |
accept(NodeVisitor iVisitor)
Accept for the visitor pattern. |
java.util.List<Node> |
childNodes()
|
ListNode |
getArgs()
Gets main arguments (as Tokens) |
Arity |
getArity()
|
BlockArgNode |
getBlockArgNode()
Gets the blockArgNode. |
ListNode |
getOptArgs()
Gets the optArgs. |
int |
getOptionalArgsCount()
|
int |
getRequiredArgsCount()
|
int |
getRestArg()
Gets the restArg. |
ArgumentNode |
getRestArgNode()
Gets the restArgNode. |
Methods inherited from class org.jruby.ast.Node |
---|
addComment, addComments, assign, createList, definition, getComments, getNodeName, getPosition, getPositionIncludingComments, hasComments, interpret, isInvisible, setPosition, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ArgsNode(ISourcePosition position, ListNode arguments, ListNode optionalArguments, int restArguments, ArgumentNode restArgNode, BlockArgNode blockArgNode)
optionalArguments
- Node describing the optional arguments
This Block will contain assignments to locals (LAsgnNode)restArguments
- 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 argumentsrestArgNode
- The rest argument (*args).blockArgNode
- An optional block argument (&arg).Method Detail |
---|
public Instruction accept(NodeVisitor iVisitor)
accept
in class Node
iVisitor
- the visitorpublic ListNode getArgs()
public Arity getArity()
public int getRequiredArgsCount()
public int getOptionalArgsCount()
public ListNode getOptArgs()
public int getRestArg()
public ArgumentNode getRestArgNode()
public BlockArgNode getBlockArgNode()
public java.util.List<Node> childNodes()
childNodes
in class Node
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |