public class ConstantPool
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static byte |
ANY_REF
Any one of the XXX_REF types.
|
static byte |
CLASS |
static byte |
DOUBLE |
static byte |
FIELDREF |
static byte |
FLOAT |
static byte |
INTEGER |
static byte |
INTERFACE_METHODREF |
static byte |
INVOKE_DYNAMIC |
static byte |
LONG |
static byte |
METHOD_HANDLE |
static byte |
METHOD_TYPE |
static byte |
METHODREF |
static byte |
NAME_AND_TYPE |
static byte |
STRING |
static byte |
UTF8 |
Constructor and Description |
---|
ConstantPool() |
ConstantPool(java.io.DataInputStream dstr) |
Modifier and Type | Method and Description |
---|---|
CpoolClass |
addClass(CpoolUtf8 name) |
CpoolClass |
addClass(ObjectType otype) |
CpoolValue2 |
addDouble(double val) |
CpoolRef |
addFieldRef(Field field) |
CpoolValue1 |
addFloat(float val) |
CpoolValue1 |
addInt(int val) |
CpoolValue2 |
addLong(long val) |
CpoolMethodHandle |
addMethodHandle(int kind,
CpoolRef reference) |
CpoolMethodHandle |
addMethodHandle(Method method) |
CpoolRef |
addMethodRef(Method method) |
CpoolNameAndType |
addNameAndType(CpoolUtf8 name,
CpoolUtf8 type) |
CpoolNameAndType |
addNameAndType(Field field) |
CpoolNameAndType |
addNameAndType(Method method) |
CpoolRef |
addRef(int tag,
CpoolClass clas,
CpoolNameAndType nameAndType) |
CpoolString |
addString(CpoolUtf8 str) |
CpoolString |
addString(java.lang.String string) |
CpoolUtf8 |
addUtf8(java.lang.String s) |
int |
getCount() |
CpoolEntry |
getPoolEntry(int index)
Get the index'th entry in pool.
|
public static final byte CLASS
public static final byte FIELDREF
public static final byte METHODREF
public static final byte INTERFACE_METHODREF
public static final byte ANY_REF
public static final byte STRING
public static final byte INTEGER
public static final byte FLOAT
public static final byte LONG
public static final byte DOUBLE
public static final byte METHOD_HANDLE
public static final byte METHOD_TYPE
public static final byte INVOKE_DYNAMIC
public static final byte NAME_AND_TYPE
public static final byte UTF8
public ConstantPool()
public ConstantPool(java.io.DataInputStream dstr) throws java.io.IOException
java.io.IOException
public final int getCount()
public final CpoolEntry getPoolEntry(int index)
public CpoolUtf8 addUtf8(java.lang.String s)
public CpoolClass addClass(ObjectType otype)
public CpoolMethodHandle addMethodHandle(Method method)
public CpoolMethodHandle addMethodHandle(int kind, CpoolRef reference)
public CpoolClass addClass(CpoolUtf8 name)
public CpoolValue1 addInt(int val)
public CpoolValue2 addLong(long val)
public CpoolValue1 addFloat(float val)
public CpoolValue2 addDouble(double val)
public final CpoolString addString(java.lang.String string)
public CpoolString addString(CpoolUtf8 str)
public CpoolNameAndType addNameAndType(Method method)
public CpoolNameAndType addNameAndType(Field field)
public CpoolNameAndType addNameAndType(CpoolUtf8 name, CpoolUtf8 type)
public CpoolRef addRef(int tag, CpoolClass clas, CpoolNameAndType nameAndType)