Package gnu.bytecode
Class CpoolEntry
- java.lang.Object
-
- gnu.bytecode.CpoolEntry
-
- Direct Known Subclasses:
CpoolClass
,CpoolInvokeDynamic
,CpoolMethodHandle
,CpoolMethodType
,CpoolNameAndType
,CpoolRef
,CpoolString
,CpoolUtf8
,CpoolValue1
,CpoolValue2
public abstract class CpoolEntry extends Object
An entry in the constant pool of a ClassType. Each entry belong to the constant pool table of the "owning" ClassType. Hashing is used to make each entry unique (with a ClassType). By convention, each sub-class has a static get_const method which is used when a contant pool entry is need: The get_const method will return an existing matching entry if possible, or allocate a new one if needed.
-
-
Field Summary
Fields Modifier and Type Field Description int
index
This entry's index in the constant pool.
-
Constructor Summary
Constructors Modifier Constructor Description protected
CpoolEntry()
CpoolEntry(ConstantPool cpool, int h)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
getIndex()
abstract int
getTag()
int
hashCode()
abstract void
print(ClassTypeWriter dst, int verbosity)
Print this constant pool entry.
-
-
-
Constructor Detail
-
CpoolEntry
protected CpoolEntry()
-
CpoolEntry
public CpoolEntry(ConstantPool cpool, int h)
-
-
Method Detail
-
getIndex
public int getIndex()
-
getTag
public abstract int getTag()
-
print
public abstract void print(ClassTypeWriter dst, int verbosity)
Print this constant pool entry. If verbosity==0, print very tersely (no extraneous text). If verbosity==1, prefix the type of the constant. If verbosity==2, add more descriptive text.
-
-