|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.claritysys.jvm.classfile.CpEntry
public abstract class CpEntry
An entry in the constant pool for a ClassFile.
| Field Summary | |
|---|---|
static byte |
TAG_CLASS
Tag bytes, from [vmspec2 4.4]. |
static byte |
TAG_DOUBLE
|
static byte |
TAG_FIELDREF
|
static byte |
TAG_FLOAT
|
static byte |
TAG_INTEGER
|
static byte |
TAG_INTERFACE_METHODREF
|
static byte |
TAG_LONG
|
static byte |
TAG_METHODREF
|
static byte |
TAG_NAME_AND_TYPE
|
static byte |
TAG_STRING
|
static byte |
TAG_UTF8
|
| Constructor Summary | |
|---|---|
CpEntry(ConstantPool pool,
byte tag,
int hash)
Create a new CpEntry in the given pool, with the given hashcode. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Clone the entry (shallow copy). |
void |
computeHash()
Signal the entry to recompute (and store) its hashcode. |
int |
getIndex()
Get this entry's index in the constant pool. |
byte |
getTag()
Return the type of entry, one of the TAG_XXX constants, as specified in [vmspec2 4.4]. |
int |
hashCode()
Return the hash code of this entry. |
java.lang.String |
toJavaString()
Convert the entry to a String as it would appear in a Java declaration. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final byte TAG_CLASS
public static final byte TAG_FIELDREF
public static final byte TAG_METHODREF
public static final byte TAG_INTERFACE_METHODREF
public static final byte TAG_STRING
public static final byte TAG_INTEGER
public static final byte TAG_FLOAT
public static final byte TAG_LONG
public static final byte TAG_DOUBLE
public static final byte TAG_NAME_AND_TYPE
public static final byte TAG_UTF8
| Constructor Detail |
|---|
public CpEntry(ConstantPool pool,
byte tag,
int hash)
pool - The constant pool to which the entry is being added.tag - The pool entry type, as one of the TAG_XXX constants.hash - The hashcode of the entry.| Method Detail |
|---|
public final int hashCode()
hashCode in class java.lang.Objectpublic void computeHash()
The default does nothing.
public final int getIndex()
public final byte getTag()
public java.lang.String toJavaString()
public java.lang.Object clone()
clone in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||