APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.tools.javac.util

public abstract Class Utf8NameTable

extends Table
Class Inheritance
Known Direct Subclasses
com.sun.tools.javac.util.SharedNameTable, com.sun.tools.javac.util.UnsharedNameTable

Support superclass for Name.Table implementations that store names as Modified UTF-8 data in byte[] arrays.

This is NOT part of any supported API. 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 and Inner Type Summary

Modifier and TypeClass and Description
protected abstract static class

Field Summary

Inherited from com.sun.tools.javac.util.Name.Table:
names

Constructor Summary

AccessConstructor and Description
protected
Utf8NameTable(Names
The main name table
names
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
protected static boolean
equals(byte[] buf1, int off1, byte[] buf2, int off2, int len)

Compare two subarrays.

protected static int
hashValue(byte[] buf, int off, int len)

Generate a hash value for a subarray.

Inherited from com.sun.tools.javac.util.Name.Table:
disposefromCharsfromStringfromUtffromUtf

Constructor Detail

Utf8NameTableback to summary
protected Utf8NameTable(Names names)

Constructor.

Parameters
names:Names

The main name table

Method Detail

equalsback to summary
protected static boolean equals(byte[] buf1, int off1, byte[] buf2, int off2, int len)

Compare two subarrays.

hashValueback to summary
protected static int hashValue(byte[] buf, int off, int len)

Generate a hash value for a subarray.

com.sun.tools.javac.util back to summary

protected abstract Class Utf8NameTable.NameImpl

extends Name
Class Inheritance
Known Direct Subclasses
com.sun.tools.javac.util.SharedNameTable.NameImpl, com.sun.tools.javac.util.UnsharedNameTable.NameImpl

Field Summary

Inherited from com.sun.tools.javac.util.Name:
table

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Name
append(Name name0)

Overrides com.sun.tools.javac.util.Name.append.

Return the concatenation of this name and the given name.

public Name
append(char ch, Name name0)

Overrides com.sun.tools.javac.util.Name.append.

Return the concatenation of this name, the given ASCII character, and the given name.

public int
compareTo(Name name0)

Overrides com.sun.tools.javac.util.Name.compareTo.

Implements java.lang.Comparable.compareTo.

Order names lexicographically.

protected abstract byte[]
getByteData()

Get the byte[] array in which the Modified UTF-8 data is stored.

protected abstract int
getByteLength()

Get the Modified UTF-8 data length in the byte array.

protected abstract int
getByteOffset()

Get the Modified UTF-8 data offset into the byte array.

protected abstract int
getNameIndex()

Get a unique index corresponding to this instance.

public void
getUtf8Bytes(byte[] buf, int off)

Implements abstract com.sun.tools.javac.util.Name.getUtf8Bytes.

Write the Modified UTF-8 encoding of this name into the given buffer starting at the specified offset.

public int
getUtf8Length()

Implements abstract com.sun.tools.javac.util.Name.getUtf8Length.

Get the length of the Modified UTF-8 encoding of this name.

public int
hashCode()

Implements abstract com.sun.tools.javac.util.Name.hashCode.

Implements javax.lang.model.element.Name.hashCode.

Obeys the general contract of Object.hashCode.

public int
lastIndexOfAscii(char ch)

Overrides com.sun.tools.javac.util.Name.lastIndexOfAscii.

Returns last occurrence of the given ASCII character in this name, -1 if not found.

public int
length()

Overrides com.sun.tools.javac.util.Name.length.

Implements java.lang.CharSequence.length.

Returns the length of this character sequence.

protected boolean
nameEquals(Name that)

Implements abstract com.sun.tools.javac.util.Name.nameEquals.

Subclass check for equality.

public boolean
startsWith(Name prefix0)

Overrides com.sun.tools.javac.util.Name.startsWith.

Determine whether this name has the given Name as a prefix.

public String
toString()

Implements abstract com.sun.tools.javac.util.Name.toString.

Implements java.lang.CharSequence.toString.

Returns a string containing the characters in this sequence in the same order as this sequence.

Inherited from com.sun.tools.javac.util.Name:
charAtcontentEqualsequalsisEmptymappoolTagsubNamesubNamesubSequencetoUtf

Constructor Detail

NameImplback to summary
pack-priv NameImpl(Utf8NameTable table)

Method Detail

appendback to summary
public Name append(Name name0)

Overrides com.sun.tools.javac.util.Name.append.

Doc from com.sun.tools.javac.util.Name.append.

Return the concatenation of this name and the given name. The given name must come from the same table as this one.

Annotations
@Override
appendback to summary
public Name append(char ch, Name name0)

Overrides com.sun.tools.javac.util.Name.append.

Doc from com.sun.tools.javac.util.Name.append.

Return the concatenation of this name, the given ASCII character, and the given name. The given name must come from the same table as this one.

Annotations
@Override
compareToback to summary
public int compareTo(Name name0)

Overrides com.sun.tools.javac.util.Name.compareTo.

Implements java.lang.Comparable.compareTo.

Doc from com.sun.tools.javac.util.Name.compareTo.

Order names lexicographically.

The ordering defined by this method must match the ordering defined by the corresponding toString() values.

Annotations
@Override
getByteDataback to summary
protected abstract byte[] getByteData()

Get the byte[] array in which the Modified UTF-8 data is stored.

getByteLengthback to summary
protected abstract int getByteLength()

Get the Modified UTF-8 data length in the byte array.

getByteOffsetback to summary
protected abstract int getByteOffset()

Get the Modified UTF-8 data offset into the byte array.

getNameIndexback to summary
protected abstract int getNameIndex()

Get a unique index corresponding to this instance.

getUtf8Bytesback to summary
public void getUtf8Bytes(byte[] buf, int off)

Implements abstract com.sun.tools.javac.util.Name.getUtf8Bytes.

Doc from com.sun.tools.javac.util.Name.getUtf8Bytes.

Write the Modified UTF-8 encoding of this name into the given buffer starting at the specified offset.

Annotations
@Override
getUtf8Lengthback to summary
public int getUtf8Length()

Implements abstract com.sun.tools.javac.util.Name.getUtf8Length.

Doc from com.sun.tools.javac.util.Name.getUtf8Length.

Get the length of the Modified UTF-8 encoding of this name.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Implements abstract com.sun.tools.javac.util.Name.hashCode.

Implements javax.lang.model.element.Name.hashCode.

Doc from javax.lang.model.element.Name.hashCode.

Obeys the general contract of Object.hashCode.

Annotations
@Override
lastIndexOfAsciiback to summary
public int lastIndexOfAscii(char ch)

Overrides com.sun.tools.javac.util.Name.lastIndexOfAscii.

Doc from com.sun.tools.javac.util.Name.lastIndexOfAscii.

Returns last occurrence of the given ASCII character in this name, -1 if not found.

The implementation in Name converts this instance to String and then delegates to String#lastIndexOf(int).

Annotations
@Override
lengthback to summary
public int length()

Overrides com.sun.tools.javac.util.Name.length.

Implements java.lang.CharSequence.length.

Doc from java.lang.CharSequence.length.

Returns the length of this character sequence. The length is the number of 16-bit chars in the sequence.

Annotations
@Override
nameEqualsback to summary
protected boolean nameEquals(Name that)

Implements abstract com.sun.tools.javac.util.Name.nameEquals.

Doc from com.sun.tools.javac.util.Name.nameEquals.

Subclass check for equality.

This method can assume that the given instance is the same type as this instance and is associated to the same Table.

Annotations
@Override
startsWithback to summary
public boolean startsWith(Name prefix0)

Overrides com.sun.tools.javac.util.Name.startsWith.

Doc from com.sun.tools.javac.util.Name.startsWith.

Determine whether this name has the given Name as a prefix.

The implementation in Name converts this and the given instance to String and then delegates to String#startsWith.

Annotations
@Override
toStringback to summary
public String toString()

Implements abstract com.sun.tools.javac.util.Name.toString.

Implements java.lang.CharSequence.toString.

Doc from java.lang.CharSequence.toString.

Returns a string containing the characters in this sequence in the same order as this sequence. The length of the string will be the length of this sequence.

Annotations
@Override