|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--kmy.jint.parser.QualifiedIdentifier
This is a representation of a class or array name, that is something like java.lang.Hashtable or java.lang.Object[]. QualifiedIdentifier consists of a list of Identifiers and a number of dimensions. A qualified identifier can be resolved by a JintClassTable to an AbstractClass.
Node: arrays that are passed to QualifiedIdentifier constructors are not copied and should not be modified afterwards.
| Field Summary | |
(package private) Identifier[] |
arr
|
(package private) int |
dim
|
(package private) int |
len
|
(package private) int |
off
|
(package private) AbstractClass |
type
|
| Constructor Summary | |
QualifiedIdentifier(Identifier[] arr)
Creates a qualified identifier from a list of identifiers. |
|
QualifiedIdentifier(Identifier[] arr,
int off,
int len)
Creates a qualified identifier from a list of identifiers, taking only identifiers from index off to off+len-1 inclusively. |
|
QualifiedIdentifier(Identifier[] arr,
int off,
int len,
int dim)
Creates array name: qualified identifier with number of dimensions. |
|
QualifiedIdentifier(QualifiedIdentifier qi,
Identifier id)
Creates a new QualifiedIdentifer by appending Identifier id to a qualified identifier qi. |
|
QualifiedIdentifier(QualifiedIdentifier qi,
int dim)
Creates array name: qualified identifier with number of dimensions. |
|
| Method Summary | |
QualifiedIdentifier |
base()
Returns QualifiedIdentifier produced by stripping all dimensions from the original QualifiedIdentifer. |
void |
copyInto(Identifier[] idArray)
Copies this QualifiedIdentifier's identifier list into a given array. |
QualifiedIdentifier |
dropOne()
Creates QualifiedIdentifier by dropping the last identifier in original QualifiedIdentifier's identifier list. |
boolean |
equals(java.lang.Object obj)
Returns true if the other object is a QualifiedIdentifier equal to this one. |
int |
getDimension()
Returns number of dimensions of this QualifiedIdentifier. |
Identifier |
getIdentifier(int i)
Returns identifier at position i in this QualifiedIdentifier's identifier list. |
AbstractClass |
getType()
Returns an AbstractClass to which this QualifiedIdentifier was resolved or null if it was not yet resolved or resolved unsuccessfully. |
int |
hashCode()
Hash code is calculated by the last identifier in QualifiedIdentifier's identifier list. |
Identifier |
lastIdentifier()
Returns last identifier in this QualifiedIdentifier's identifier list. |
int |
length()
Returns number of identifiers in this QualifiedIdentifier's identifier list. |
boolean |
same(QualifiedIdentifier other)
Returns true if the other QualifiedIdentifier equal to this one. |
void |
setType(AbstractClass type)
This method is called when QualifiedIdentifier is resolved to an AbstractClass, so the next time it can be resolved without any lookups. |
boolean |
startsWith(QualifiedIdentifier other)
Returns true if this QualifiedIdentifier's identifier list starts with the other QualifiedIdentifier's identifier list. |
java.lang.String |
toSimpleJVMName()
Returns JVM class name for non-inner, non-array classes. |
java.lang.String |
toString()
Returns String representation of this QualifiedIdentifier: dot-separated list of identifiers plus '[]' for every dimension. |
java.lang.String |
toString(char sep)
The same as toString(), but uses sep instead of '.' as separator. |
void |
writeDescriptor(java.lang.StringBuffer buf)
Writes class descriptor to a given StringBuffer. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
Identifier[] arr
int off
int len
int dim
AbstractClass type
| Constructor Detail |
public QualifiedIdentifier(Identifier[] arr)
public QualifiedIdentifier(Identifier[] arr,
int off,
int len)
public QualifiedIdentifier(Identifier[] arr,
int off,
int len,
int dim)
public QualifiedIdentifier(QualifiedIdentifier qi,
Identifier id)
public QualifiedIdentifier(QualifiedIdentifier qi,
int dim)
| Method Detail |
public QualifiedIdentifier dropOne()
public QualifiedIdentifier base()
public boolean equals(java.lang.Object obj)
public boolean same(QualifiedIdentifier other)
public boolean startsWith(QualifiedIdentifier other)
public int hashCode()
public Identifier lastIdentifier()
public Identifier getIdentifier(int i)
public int length()
public java.lang.String toString()
public java.lang.String toSimpleJVMName()
public java.lang.String toString(char sep)
public void writeDescriptor(java.lang.StringBuffer buf)
public void setType(AbstractClass type)
public AbstractClass getType()
public void copyInto(Identifier[] idArray)
public int getDimension()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||