public class ArgsNode extends Node
Modifier and Type | Field and Description |
---|---|
protected Arity |
arity |
protected boolean |
hasKwargs |
protected boolean |
hasMasgnArgs |
protected boolean |
hasOptArgs |
protected boolean |
isSimple |
protected int |
maxArgsCount |
protected int |
restArg |
protected ArgumentNode |
restArgNode |
Constructor and Description |
---|
ArgsNode(ISourcePosition position,
ListNode pre,
ListNode optionalArguments,
RestArgNode rest,
ListNode post,
BlockArgNode blockArgNode)
Construct a new ArgsNode with no keyword arguments.
|
ArgsNode(ISourcePosition position,
ListNode pre,
ListNode optionalArguments,
RestArgNode rest,
ListNode post,
ListNode keywords,
KeywordRestArgNode keyRest,
BlockArgNode blockArgNode)
Construct a new ArgsNode with keyword arguments.
|
assign, createList, createList, createList, createList, definition, getNodeName, getPosition, interpret, isNil, setPosition, toString
protected final ArgumentNode restArgNode
protected final int restArg
protected Arity arity
protected final boolean hasOptArgs
protected final boolean hasMasgnArgs
protected final boolean hasKwargs
protected int maxArgsCount
protected final boolean isSimple
public ArgsNode(ISourcePosition position, ListNode pre, ListNode optionalArguments, RestArgNode rest, ListNode post, BlockArgNode blockArgNode)
position
- pre
- optionalArguments
- rest
- post
- blockArgNode
- public ArgsNode(ISourcePosition position, ListNode pre, ListNode optionalArguments, RestArgNode rest, ListNode post, ListNode keywords, KeywordRestArgNode keyRest, BlockArgNode blockArgNode)
position
- pre
- optionalArguments
- rest
- post
- keywords
- keyRest
- blockArgNode
- public NodeType getNodeType()
getNodeType
in class Node
protected Arity calculateArity()
protected boolean hasMasgnArgs()
public Object accept(NodeVisitor iVisitor)
public ListNode getPre()
@Deprecated public ListNode getArgs()
public Arity getArity()
public int getRequiredArgsCount()
public int getOptionalArgsCount()
public ListNode getPost()
public int getMaxArgumentsCount()
public ListNode getOptArgs()
public int getRestArg()
public ArgumentNode getRestArgNode()
@Deprecated public BlockArgNode getBlockArgNode()
public BlockArgNode getBlock()
public int getPostCount()
public int getPostIndex()
public int getPreCount()
public ListNode getKeywords()
public KeywordRestArgNode getKeyRest()
public void prepare(ThreadContext context, Ruby runtime, IRubyObject self, IRubyObject[] args, Block block)
public void prepare(ThreadContext context, Ruby runtime, IRubyObject self, Block block)
public void prepare(ThreadContext context, Ruby runtime, IRubyObject self, IRubyObject arg0, Block block)
public void prepare(ThreadContext context, Ruby runtime, IRubyObject self, IRubyObject arg0, IRubyObject arg1, Block block)
public void prepare(ThreadContext context, Ruby runtime, IRubyObject self, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
public void prepare(ThreadContext context, Ruby runtime, IRubyObject self, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, Block block)
public void prepare(ThreadContext context, Ruby runtime, IRubyObject self, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4, Block block)
public void prepare(ThreadContext context, Ruby runtime, IRubyObject self, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4, IRubyObject arg5, Block block)
public void prepare(ThreadContext context, Ruby runtime, IRubyObject self, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4, IRubyObject arg5, IRubyObject arg6, Block block)
public void prepare(ThreadContext context, Ruby runtime, IRubyObject self, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4, IRubyObject arg5, IRubyObject arg6, IRubyObject arg7, Block block)
public void prepare(ThreadContext context, Ruby runtime, IRubyObject self, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4, IRubyObject arg5, IRubyObject arg6, IRubyObject arg7, IRubyObject arg8, Block block)
public void prepare(ThreadContext context, Ruby runtime, IRubyObject self, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4, IRubyObject arg5, IRubyObject arg6, IRubyObject arg7, IRubyObject arg8, IRubyObject arg9, Block block)
public void checkArgCount(Ruby runtime, int argsLength)
protected void prepareOptOrRestArgs(ThreadContext context, Ruby runtime, DynamicScope scope, IRubyObject self, IRubyObject[] args, RubyHash kwvals)
protected int prepareOptionalArguments(ThreadContext context, Ruby runtime, IRubyObject self, IRubyObject[] args, int arglen)
protected void prepareRestArg(ThreadContext context, Ruby runtime, DynamicScope scope, IRubyObject[] args, int arglen, int givenArgsCount)
protected int assignOptArgs(IRubyObject[] args, Ruby runtime, ThreadContext context, IRubyObject self, int givenArgsCount, int arglen)
protected void assignKwargs(RubyHash keyValues, Ruby runtime, ThreadContext context, DynamicScope scope, IRubyObject self)
protected void processBlockArg(DynamicScope scope, Ruby runtime, Block block)
public List<Node> childNodes()
childNodes
in class Node
Copyright © 2001-2016 JRuby. All Rights Reserved.