|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jrubyparser.ast.Node
org.jrubyparser.ast.ArgsNode
public class ArgsNode
Represents the argument declarations of a method. The fields: foo(p1, ..., pn, o1 = v1, ..., on = v2, *r, q1, ..., qn) p1...pn = pre arguments o1...on = optional arguments r = rest argument q1...qn = post arguments (only in 1.9)
| Field Summary | |
|---|---|
protected ArgumentNode |
rest
|
| Constructor Summary | |
|---|---|
ArgsNode(SourcePosition position,
ListNode pre,
ListNode optional,
RestArgNode rest,
ListNode post,
ListNode keywords,
KeywordRestArgNode keywordRest,
BlockArgNode block)
|
|
| Method Summary | |
|---|---|
Object |
accept(NodeVisitor iVisitor)
Accept for the visitor pattern. |
BlockArgNode |
getBlock()
Gets the explicit block argument of the parameter list (&block). |
int |
getMaxArgumentsCount()
|
NodeType |
getNodeType()
|
List<Node> |
getNormativeParameterList()
|
List<String> |
getNormativeParameterNameList(boolean namesOnly)
Return a list of all possible parameter names. |
ListNode |
getOptional()
Gets the optional Arguments. |
int |
getOptionalCount()
|
ListNode |
getPost()
|
int |
getPostCount()
|
ListNode |
getPre()
Gets the required arguments at the beginning of the argument definition |
int |
getPreCount()
|
int |
getRequiredCount()
|
ArgumentNode |
getRest()
Gets the rest node. |
boolean |
isSame(Node node)
Checks node for 'sameness' for diffing. |
| 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 |
|---|
protected ArgumentNode rest
| Constructor Detail |
|---|
public ArgsNode(SourcePosition position,
ListNode pre,
ListNode optional,
RestArgNode rest,
ListNode post,
ListNode keywords,
KeywordRestArgNode keywordRest,
BlockArgNode block)
position - of the argumentspre - Required nodes at the beginning of the method definitionoptional - Node describing the optional argumentsrest - The rest argument (*args).post - Required nodes at the end of the method definitionblock - An optional block argument (&arg).| Method Detail |
|---|
public boolean isSame(Node node)
isSame in class Nodenode - to be compared to
public NodeType getNodeType()
getNodeType in class Nodepublic Object accept(NodeVisitor iVisitor)
accept in class NodeiVisitor - the visitorpublic int getPreCount()
public int getOptionalCount()
public int getPostCount()
public int getRequiredCount()
public int getMaxArgumentsCount()
public ListNode getOptional()
public ListNode getPost()
public ListNode getPre()
public ArgumentNode getRest()
public BlockArgNode getBlock()
public List<String> getNormativeParameterNameList(boolean namesOnly)
namesOnly - do not prepend '*', '**', or '&' onto front of special parameterspublic List<Node> getNormativeParameterList()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||