org.apache.tools.ant.taskdefs.optional.depend.constantpool
Class ConstantPoolEntry
java.lang.Object
org.apache.tools.ant.taskdefs.optional.depend.constantpool.ConstantPoolEntry
public abstract class ConstantPoolEntry
extends java.lang.Object
An entry in the constant pool. This class contains a representation of the
constant pool entries. It is an abstract base class for all the different
forms of constant pool entry.
int | getNumEntries() - Get the number of Constant Pool Entry slots within the constant pool
occupied by this entry.
|
int | getTag() - Get the Entry's type tag.
|
boolean | isResolved() - Indicates whether this entry has been resolved.
|
abstract void | read(DataInputStream cpStream) - read a constant pool entry from a class stream.
|
static ConstantPoolEntry | readEntry(DataInputStream cpStream) - Read a constant pool entry from a stream.
|
void | resolve(ConstantPool constantPool) - Resolve this constant pool entry with respect to its dependents in
the constant pool.
|
CONSTANT_CLASS
public static final int CONSTANT_CLASS
Tag value for Class entries.
CONSTANT_DOUBLE
public static final int CONSTANT_DOUBLE
Tag value for Double entries.
CONSTANT_FIELDREF
public static final int CONSTANT_FIELDREF
Tag value for Field Reference entries.
CONSTANT_FLOAT
public static final int CONSTANT_FLOAT
Tag value for Float entries.
CONSTANT_INTEGER
public static final int CONSTANT_INTEGER
Tag value for Integer entries.
CONSTANT_INTERFACEMETHODREF
public static final int CONSTANT_INTERFACEMETHODREF
Tag value for Interface Method Reference entries.
CONSTANT_LONG
public static final int CONSTANT_LONG
Tag value for Long entries.
CONSTANT_METHODREF
public static final int CONSTANT_METHODREF
Tag value for Method Reference entries.
CONSTANT_NAMEANDTYPE
public static final int CONSTANT_NAMEANDTYPE
Tag value for Name and Type entries.
CONSTANT_STRING
public static final int CONSTANT_STRING
Tag value for String entries.
CONSTANT_UTF8
public static final int CONSTANT_UTF8
Tag value for UTF8 entries.
ConstantPoolEntry
public ConstantPoolEntry(int tagValue,
int entries)
Initialise the constant pool entry.
tagValue
- the tag value which identifies which type of constant
pool entry this is.entries
- the number of constant pool entry slots this entry
occupies.
getNumEntries
public final int getNumEntries()
Get the number of Constant Pool Entry slots within the constant pool
occupied by this entry.
- the number of slots used.
getTag
public int getTag()
Get the Entry's type tag.
- The Tag value of this entry
isResolved
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.
- true if this entry has been resolved.
read
public abstract void read(DataInputStream cpStream)
throws IOException
read a constant pool entry from a class stream.
cpStream
- the DataInputStream which contains the constant pool
entry to be read.
readEntry
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.
cpStream
- the stream from which the constant pool entry is to
be read.
- the appropriate ConstantPoolEntry subclass representing the
constant pool entry from the stream.
resolve
public void resolve(ConstantPool constantPool)
Resolve this constant pool entry with respect to its dependents in
the constant pool.
constantPool
- the constant pool of which this entry is a member
and against which this entry is to be resolved.
Copyright B) 2000-2006 Apache Software Foundation. All Rights Reserved.