|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jeffpalm.javaparser.SimpleNode
com.jeffpalm.javaparser.ASTName
public class ASTName
Stores a name. The name can consist of a number of parts separated by periods. The name consists of parts which are stored as ASTIdentifier nodes in this objects children.
| Field Summary | |
|---|---|
protected java.lang.String |
name
The cached value of the name. |
| Fields inherited from class com.jeffpalm.javaparser.SimpleNode |
|---|
children, id, parent, parser, specials |
| Constructor Summary | |
|---|---|
ASTName()
Constructor for the ASTName node. |
|
ASTName(int identifier)
Constructor for the ASTName node. |
|
ASTName(JavaParser parser,
int identifier)
Constructor for the ASTName node. |
|
| Method Summary | |
|---|---|
void |
addNamePart(java.lang.String newName)
Set the node's name |
ASTName |
changeStartingPart(ASTName oldBase,
ASTName newBase)
Change starting part. |
boolean |
equals(java.lang.Object other)
Checks to see if the two names are equal |
void |
fromString(java.lang.String input)
Convert this object from a string |
java.lang.String |
getName()
Get the node's name |
java.lang.String |
getNamePart(int ndx)
Add a component of the name |
int |
getNameSize()
Get the length of the name |
int |
hashCode()
Computes a hash value for this node. |
void |
insertNamePart(int ndx,
java.lang.String value)
Add a component of the name |
java.lang.Object |
jjtAccept(JavaParserVisitor visitor,
java.lang.Object data)
Accept the visitor. |
void |
setImage(java.lang.String image)
Convert this object from a string (used for PMD testing) |
void |
setNamePart(int ndx,
java.lang.String value)
Add a component of the name |
boolean |
startsWith(ASTName otherName)
Determines if two names start with the same series of items |
| Methods inherited from class com.jeffpalm.javaparser.SimpleNode |
|---|
addSpecial, childrenAccept, dump, dumpString, findChildrenOfType, findChildrenOfType, findChildrenOfType, getBeginColumn, getBeginLine, getEndColumn, getEndLine, getImage, getScope, getSpecial, hasAnyChildren, init, isRequired, jjtAddChild, jjtAddFirstChild, jjtClose, jjtDeleteChild, jjtGetChild, jjtGetFirstChild, jjtGetID, jjtGetNumChildren, jjtGetParent, jjtInsertChild, jjtOpen, jjtSetParent, printModifiers, removeSpecial, setLineAndColumnInfo, setScope, testingOnly__setBeginColumn, testingOnly__setBeginLine, toString, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String name
| Constructor Detail |
|---|
public ASTName()
public ASTName(int identifier)
identifier - The id of this node (JJTNAME).
public ASTName(JavaParser parser,
int identifier)
parser - The JavaParser that created this ASTName node.identifier - The id of this node (JJTNAME).| Method Detail |
|---|
public void setNamePart(int ndx,
java.lang.String value)
ndx - the index of the part requestedvalue - The new NamePart valuepublic void setImage(java.lang.String image)
image - The name in form "org.test.AName" for examplepublic java.lang.String getNamePart(int ndx)
ndx - the index of the part requested
public java.lang.String getName()
getName in class SimpleNodepublic int getNameSize()
public void insertNamePart(int ndx,
java.lang.String value)
ndx - the index of the part requestedvalue - Description of Parameterpublic void addNamePart(java.lang.String newName)
newName - the new namepublic void fromString(java.lang.String input)
input - Description of Parameterpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - Description of Parameter
public int hashCode()
hashCode in class java.lang.Objectpublic boolean startsWith(ASTName otherName)
otherName - Description of Parameter
public ASTName changeStartingPart(ASTName oldBase,
ASTName newBase)
oldBase - Description of ParameternewBase - Description of Parameter
public java.lang.Object jjtAccept(JavaParserVisitor visitor,
java.lang.Object data)
jjtAccept in interface NodejjtAccept in class SimpleNodevisitor - An implementation of JavaParserVisitor that processes the ASTName node.data - Some data being passed between the visitor methods.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||