|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.tools.javac.util.Name
public abstract class Name
An abstraction for internal compiler strings. They are stored in Utf8 format. Names are stored in a Name.Table, and are unique within that table.
This is NOT part of any API supported by Sun Microsystems. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
| Nested Class Summary | |
|---|---|
static class |
Name.Table
An abstraction for the hash table used to create unique Name instances. |
| Field Summary | |
|---|---|
Name.Table |
table
|
| Constructor Summary | |
|---|---|
protected |
Name(Name.Table table)
|
| Method Summary | |
|---|---|
Name |
append(char c,
Name n)
Return the concatenation of this name, the given ASCII character, and name `n'. |
Name |
append(Name n)
Return the concatenation of this name and name `n'. |
char |
charAt(int index)
|
int |
compareTo(Name other)
An arbitrary but consistent complete order among all Names. |
boolean |
contentEquals(java.lang.CharSequence cs)
Compares this name to the specified CharSequence. |
abstract byte[] |
getByteArray()
Get the underlying byte array for this name. |
abstract byte |
getByteAt(int i)
Returns i'th byte of this name. |
abstract int |
getByteLength()
Get the length (in bytes) of this name. |
abstract int |
getByteOffset()
Get the start offset of this name within its byte array. |
void |
getBytes(byte[] cs,
int start)
Copy all bytes of this name to buffer cs, starting at start. |
abstract int |
getIndex()
|
boolean |
isEmpty()
Return true if this is the empty name. |
int |
lastIndexOf(byte b)
Returns last occurrence of byte b in this name, -1 if not found. |
int |
length()
|
boolean |
startsWith(Name prefix)
Does this name start with prefix? |
Name |
subName(int start,
int end)
Returns the sub-name starting at position start, up to and excluding position end. |
java.lang.CharSequence |
subSequence(int start,
int end)
|
java.lang.String |
toString()
Return the string representation of this name. |
byte[] |
toUtf()
Return the Utf8 representation of this name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.lang.model.element.Name |
|---|
equals, hashCode |
| Field Detail |
|---|
public final Name.Table table
| Constructor Detail |
|---|
protected Name(Name.Table table)
| Method Detail |
|---|
public boolean contentEquals(java.lang.CharSequence cs)
NameCharSequence. The result
is true if and only if this name represents the same sequence
of char values as the specified sequence.
contentEquals in interface Namecs - The sequence to compare this name against
true if this name represents the same sequence
of char values as the specified sequence, false
otherwiseString.contentEquals(CharSequence)public int length()
length in interface java.lang.CharSequencepublic char charAt(int index)
charAt in interface java.lang.CharSequence
public java.lang.CharSequence subSequence(int start,
int end)
subSequence in interface java.lang.CharSequencepublic Name append(Name n)
public Name append(char c,
Name n)
public int compareTo(Name other)
public boolean isEmpty()
public int lastIndexOf(byte b)
public boolean startsWith(Name prefix)
public Name subName(int start,
int end)
public java.lang.String toString()
toString in interface java.lang.CharSequencetoString in class java.lang.Objectpublic byte[] toUtf()
public abstract int getIndex()
public abstract int getByteLength()
public abstract byte getByteAt(int i)
public void getBytes(byte[] cs,
int start)
public abstract byte[] getByteArray()
public abstract int getByteOffset()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||