|
||||||||||
| 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.MethodDefNode
public abstract class MethodDefNode
| Field Summary | |
|---|---|
protected ArgsNode |
argsNode
|
protected Node |
bodyNode
|
protected MethodNameNode |
nameNode
|
protected StaticScope |
scope
|
| Constructor Summary | |
|---|---|
MethodDefNode(SourcePosition position,
MethodNameNode nameNode,
ArgsNode argsNode,
StaticScope scope,
Node bodyNode)
|
|
| Method Summary | |
|---|---|
ArgsNode |
getArgs()
Gets the argsNode. |
ArgsNode |
getArgsNode()
Deprecated. |
Node |
getBody()
Gets the body of this class. |
Node |
getBodyNode()
Deprecated. |
String |
getLexicalName()
Get the name including any leading sigils. |
SourcePosition |
getLexicalNamePosition()
The position of the name + any sigils that come with it. |
String |
getName()
Gets the name. |
MethodNameNode |
getNameNode()
Gets the name's node. |
SourcePosition |
getNamePosition()
The position of just the name part of the node. |
String |
getNormativeSignature()
Note: This will give a string a representation which will always be consistent whether you specify a method definition using parens or not. |
ILocalVariable |
getParameterNamed(String name)
|
StaticScope |
getScope()
Get the static scoping information. |
boolean |
isNameMatch(String name)
|
boolean |
isParameterUsed(String name)
Given a name (presumably retrieve via getNormativeSignatureNameList()) is this parmeter used in this method definition? |
boolean |
isSame(Node node)
Checks node for 'sameness' for diffing. |
void |
setName(String name)
Set the name (name should not include sigils). |
| Methods inherited from class org.jrubyparser.ast.Node |
|---|
accept, adopt, adopt, adoptUsingNodesPosition, childNodes, comparePositionWith, createList, getClosestIScope, getClosestModule, getGrandParent, getInlineComment, getInnermostIter, getMethodFor, getNodeAt, getNodeName, getNodeType, 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 |
| Methods inherited from interface org.jrubyparser.ast.IScope |
|---|
getVariableReferencesNamed |
| Field Detail |
|---|
protected MethodNameNode nameNode
protected ArgsNode argsNode
protected StaticScope scope
protected Node bodyNode
| Constructor Detail |
|---|
public MethodDefNode(SourcePosition position,
MethodNameNode nameNode,
ArgsNode argsNode,
StaticScope scope,
Node bodyNode)
| Method Detail |
|---|
public boolean isSame(Node node)
isSame in class Nodenode - to be compared to
public ArgsNode getArgs()
@Deprecated public ArgsNode getArgsNode()
public StaticScope getScope()
public Node getBody()
@Deprecated public Node getBodyNode()
public String getLexicalName()
INameNode
getLexicalName in interface INameNodepublic MethodNameNode getNameNode()
public String getName()
getName in interface INameNodepublic void setName(String name)
INameNode
setName in interface INameNodepublic boolean isNameMatch(String name)
isNameMatch in interface INameMatchablepublic SourcePosition getNamePosition()
INameNode
getNamePosition in interface INameNodepublic SourcePosition getLexicalNamePosition()
INameNode
getLexicalNamePosition in interface INameNodepublic boolean isParameterUsed(String name)
isParameterUsed in interface IParameterScopename -
public ILocalVariable getParameterNamed(String name)
getParameterNamed in interface IParameterScopepublic String getNormativeSignature()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||