ConstantPool
Modifier and Type | Field and Description |
---|---|
public static final int | CONSTANT_CLASS
Tag value for Class entries. |
public static final int | CONSTANT_DOUBLE
Tag value for Double entries. |
public static final int | CONSTANT_FIELDREF
Tag value for Field Reference entries. |
public static final int | CONSTANT_FLOAT
Tag value for Float entries. |
public static final int | CONSTANT_INTEGER
Tag value for Integer entries. |
public static final int | CONSTANT_INTERFACEMETHODREF
Tag value for Interface Method Reference entries. |
public static final int | CONSTANT_INVOKEDYNAMIC
Tag value for InvokeDynamic entries |
public static final int | CONSTANT_LONG
Tag value for Long entries. |
public static final int | CONSTANT_METHODHANDLE
Tag value for Method Handle entries |
public static final int | CONSTANT_METHODREF
Tag value for Method Reference entries. |
public static final int | CONSTANT_METHODTYPE
Tag value for Method Type entries |
public static final int | CONSTANT_MODULEINFO
Tag value for CONSTANT_Module_info entry |
public static final int | CONSTANT_NAMEANDTYPE
Tag value for Name and Type entries. |
public static final int | CONSTANT_PACKAGEINFO
Tag value for CONSTANT_Package_info entry (within a module) |
public static final int | CONSTANT_STRING
Tag value for String entries. |
public static final int | CONSTANT_UTF8
Tag value for UTF8 entries. |
private int | numEntries
The number of slots in the constant pool, occupied by this entry. |
private boolean | resolved
A flag which indicates if this entry has been resolved or not. |
private int | tag
This entry's tag which identifies the type of this constant pool entry. |
Access | Constructor and Description |
---|---|
public | ConstantPoolEntry(int
the tag value which identifies which type of constant
pool entry this is. tagValue, int the number of constant pool entry slots this entry
occupies. entries)Initialise the constant pool entry. |
Modifier and Type | Method and Description |
---|---|
public final int | Returns: the number of slots used.Get the number of Constant Pool Entry slots within the constant pool occupied by this entry. |
public int | |
public boolean | Returns: true if this entry has been resolved.Indicates whether this entry has been resolved. |
public abstract void | read(DataInputStream
the DataInputStream which contains the constant pool
entry to be read. cpStream)read a constant pool entry from a class stream. |
public static ConstantPoolEntry | Returns: the appropriate ConstantPoolEntry subclass representing the constant pool entry from the stream.the stream from which the constant pool entry is to
be read. cpStream)Read a constant pool entry from a stream. |
public void | resolve(ConstantPool
the constant pool of which this entry is a member
and against which this entry is to be resolved. constantPool)Resolve this constant pool entry with respect to its dependents in the constant pool. |
CONSTANT_CLASS | back to summary |
---|---|
public static final int CONSTANT_CLASS Tag value for Class entries. |
CONSTANT_DOUBLE | back to summary |
---|---|
public static final int CONSTANT_DOUBLE Tag value for Double entries. |
CONSTANT_FIELDREF | back to summary |
---|---|
public static final int CONSTANT_FIELDREF Tag value for Field Reference entries. |
CONSTANT_FLOAT | back to summary |
---|---|
public static final int CONSTANT_FLOAT Tag value for Float entries. |
CONSTANT_INTEGER | back to summary |
---|---|
public static final int CONSTANT_INTEGER Tag value for Integer entries. |
CONSTANT_INTERFACEMETHODREF | back to summary |
---|---|
public static final int CONSTANT_INTERFACEMETHODREF Tag value for Interface Method Reference entries. |
CONSTANT_INVOKEDYNAMIC | back to summary |
---|---|
public static final int CONSTANT_INVOKEDYNAMIC Tag value for InvokeDynamic entries |
CONSTANT_LONG | back to summary |
---|---|
public static final int CONSTANT_LONG Tag value for Long entries. |
CONSTANT_METHODHANDLE | back to summary |
---|---|
public static final int CONSTANT_METHODHANDLE Tag value for Method Handle entries |
CONSTANT_METHODREF | back to summary |
---|---|
public static final int CONSTANT_METHODREF Tag value for Method Reference entries. |
CONSTANT_METHODTYPE | back to summary |
---|---|
public static final int CONSTANT_METHODTYPE Tag value for Method Type entries |
CONSTANT_MODULEINFO | back to summary |
---|---|
public static final int CONSTANT_MODULEINFO Tag value for CONSTANT_Module_info entry |
CONSTANT_NAMEANDTYPE | back to summary |
---|---|
public static final int CONSTANT_NAMEANDTYPE Tag value for Name and Type entries. |
CONSTANT_PACKAGEINFO | back to summary |
---|---|
public static final int CONSTANT_PACKAGEINFO Tag value for CONSTANT_Package_info entry (within a module) |
CONSTANT_STRING | back to summary |
---|---|
public static final int CONSTANT_STRING Tag value for String entries. |
CONSTANT_UTF8 | back to summary |
---|---|
public static final int CONSTANT_UTF8 Tag value for UTF8 entries. |
numEntries | back to summary |
---|---|
private int numEntries The number of slots in the constant pool, occupied by this entry. |
resolved | back to summary |
---|---|
private boolean resolved A flag which indicates if this entry has been resolved or not. |
tag | back to summary |
---|---|
private int tag This entry's tag which identifies the type of this constant pool entry. |
ConstantPoolEntry | back to summary |
---|---|
public ConstantPoolEntry(int tagValue, int entries) Initialise the constant pool entry.
|
getNumEntries | back to summary |
---|---|
public final int getNumEntries() Get the number of Constant Pool Entry slots within the constant pool occupied by this entry.
|
getTag | back to summary |
---|---|
public int getTag() Get the Entry's type tag.
|
isResolved | back to summary |
---|---|
public boolean isResolved() Indicates whether this entry has been resolved. In general a constant pool entry can reference another constant pool entry by its index value. Resolution involves replacing this index value with the constant pool entry at that index.
|
read | back to summary |
---|---|
public abstract void read(DataInputStream cpStream) throws IOException read a constant pool entry from a class stream.
|
readEntry | back to summary |
---|---|
public static ConstantPoolEntry readEntry(DataInputStream cpStream) throws IOException Read a constant pool entry from a stream. This is a factory method which reads a constant pool entry form a stream and returns the appropriate subclass for the entry.
|
resolve | back to summary |
---|---|
public void resolve(ConstantPool constantPool) Resolve this constant pool entry with respect to its dependents in the constant pool.
|