|
ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavafe.ast.ASTNode
javafe.ast.Name
javafe.ast.SimpleName
Field Summary | |
Identifier |
id
|
int |
loc
|
Fields inherited from class javafe.ast.Name |
emptyStringArray |
Fields inherited from class javafe.ast.ASTNode |
decorations |
Constructor Summary | |
protected |
SimpleName()
Construct a raw SimpleName whose class invariant(s) have not yet been established. |
Method Summary | |
void |
accept(Visitor v)
Accept a visit from v . |
java.lang.Object |
accept(VisitorArgResult v,
java.lang.Object o)
|
void |
check()
|
java.lang.Object |
childAt(int index)
Return the first-but-ith child of a node. |
int |
childCount()
Return the number of children a node has. |
boolean |
equals(java.lang.Object other)
Return true if other is a Name that
is component-wise equal to this . |
int |
getStartLoc()
|
int |
getTag()
Return the tag of a node. |
int |
hashCode()
Return a hash code for this such that two
Name s that are equals have the same hash
code. |
Identifier |
identifierAt(int i)
Return the ith identifier of this . |
int |
locDotAfter(int i)
Return the location of the dot after the ith identifier of this . |
int |
locIdAt(int i)
Return the location of the ith identifier of this . |
static SimpleName |
make(Identifier id,
int loc)
|
Name |
prefix(int len)
Return a Name consisting of the first
len identifiers of this . |
java.lang.String |
printName()
Return our printname, which will be of one of the forms X, X.Y, X.Y.Z, ... |
int |
size()
Return the number of identifiers in this . |
java.lang.String |
toString()
Return a string representation of this .
|
java.lang.String[] |
toStrings(int len)
Return the first len identifiers in
this in an array. |
Methods inherited from class javafe.ast.Name |
getEndLoc, make, make, toStrings |
Methods inherited from class javafe.ast.ASTNode |
clone, clone, getDecorations, setDecorations |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public Identifier id
public int loc
Constructor Detail |
protected SimpleName()
Method Detail |
public java.lang.String printName()
Name
printName
in class Name
this
in Java's
syntax.public boolean equals(java.lang.Object other)
Name
other
is a Name
that
is component-wise equal to this
.
equals
in class Name
public Name prefix(int len)
Name
Name
consisting of the first
len
identifiers of this
. Requires
that len
is greater than zero and less than or
equal to the length of this
.
prefix
in class Name
public int hashCode()
this
such that two
Name
s that are equals
have the same hash
code.
hashCode
in class Name
public java.lang.String[] toStrings(int len)
Name
len
identifiers in
this
in an array. Requires that len
be between 0 and length of this
inclusive.
toStrings
in class Name
len
identifiers in
this
in an array. Requires that len
be
between 0 and length of this
inclusive.public int size()
this
.
size
in class Name
public Identifier identifierAt(int i)
this
.
identifierAt
in class Name
public int locIdAt(int i)
this
.
locIdAt
in class Name
public int locDotAfter(int i)
this
.
locDotAfter
in class Name
public int getStartLoc()
getStartLoc
in class ASTNode
public final int childCount()
ASTNode
childCount
in class ASTNode
public final java.lang.Object childAt(int index)
ASTNode
childAt
in class ASTNode
public final java.lang.String toString()
ASTNode
this
.
Meant for debugging use only, not for presentation.
toString
in class ASTNode
public final int getTag()
ASTNode
getTag
in class ASTNode
public final void accept(Visitor v)
ASTNode
v
. This method simply
calls the method of v
corresponding to the
allocated type of this
, passing this
as the argument. See the design patterns book.
accept
in class ASTNode
public final java.lang.Object accept(VisitorArgResult v, java.lang.Object o)
accept
in class ASTNode
public void check()
check
in class Name
public static SimpleName make(Identifier id, int loc)
|
ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |