|
||||||||||
| 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.NamedNode
public abstract class NamedNode
Nodes with string names are very common.
| Constructor Summary | |
|---|---|
NamedNode(SourcePosition position,
String name)
|
|
| Method Summary | |
|---|---|
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. |
SourcePosition |
getNamePosition()
The position of just the name part of the node. |
boolean |
isNameMatch(String testName)
Does the supplied name match this one? |
boolean |
isSame(Node node)
Checks node for 'sameness' for diffing. |
void |
setName(String name)
Sets the name (for refactoring support) |
| 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 |
| Constructor Detail |
|---|
public NamedNode(SourcePosition position,
String name)
| Method Detail |
|---|
public boolean isSame(Node node)
isSame in class Nodenode - to be compared to
public String getLexicalName()
INameNode
getLexicalName in interface INameNodepublic String getName()
getName in interface INameNodepublic void setName(String name)
setName in interface INameNodename - is the new namepublic boolean isNameMatch(String testName)
isNameMatch in interface INameMatchabletestName - public SourcePosition getNamePosition()
INameNode
getNamePosition in interface INameNodepublic SourcePosition getLexicalNamePosition()
INameNode
getLexicalNamePosition in interface INameNode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||