public final class ConstantPoolParser extends Object implements ClassConstants
Modifier and Type | Class and Description |
---|---|
static class |
ConstantPoolParser.ReferenceToken |
ACC_ABSTRACT, ACC_FINAL, ACC_INTERFACE, ACC_NATIVE, ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC, ACC_STATIC, ACC_STRICT, ACC_SUPER, ACC_SYNCHRONIZED, ACC_TRANSIENT, ACC_VOLATILE, CONSTANT_Class, CONSTANT_Double, CONSTANT_FieldRef, CONSTANT_Float, CONSTANT_Integer, CONSTANT_InterfaceMethodRef, CONSTANT_InvokeDynamic, CONSTANT_Long, CONSTANT_MethodHandle, CONSTANT_MethodRef, CONSTANT_MethodType, CONSTANT_NameAndType, CONSTANT_String, CONSTANT_Utf8, MAGIC, REF_getField, REF_getStatic, REF_invokeInterface, REF_invokeSpecial, REF_invokeStatic, REF_invokeVirtual, REF_newInvokeSpecial, REF_putField, REF_putStatic
Constructor and Description |
---|
ConstantPoolParser(byte[] bytes,
int offset,
int itemCount) |
Modifier and Type | Method and Description |
---|---|
String |
getCPClass(int i) |
double |
getCPDouble(int i) |
BootstrapMethodsReader.BootstrapMethod |
getCPDynBootstrap(int i) |
String |
getCPDynName(int i) |
String |
getCPDynType(int i) |
float |
getCPFloat(int i) |
String |
getCPHandleClass(int i) |
byte |
getCPHandleKind(int i) |
String |
getCPHandleName(int i) |
String |
getCPHandleType(int i) |
int |
getCPInt(int i) |
long |
getCPLong(int i) |
String |
getCPMethodType(int i) |
String |
getCPNATName(int i) |
String |
getCPNATType(int i) |
String |
getCPRefClass(int i) |
String |
getCPRefName(int i) |
String |
getCPRefType(int i) |
String |
getCPString(int i) |
String |
getCPUtf8(int i) |
int |
getItemCount() |
byte |
getItemType(int i) |
byte[] |
getRawBytes() |
int |
getRawOffset() |
int |
getRawSize() |
static boolean |
isRef(byte b)
Does b represent the tag of a constant pool reference to an (interface)
method or field?
|
public ConstantPoolParser(byte[] bytes, int offset, int itemCount) throws InvalidClassFileException
bytes
- the raw class file dataoffset
- the start of the constant pool dataitemCount
- the number of items in the poolclassReader
- InvalidClassFileException
public byte[] getRawBytes()
public int getRawOffset() throws IllegalStateException
IllegalStateException
public int getRawSize() throws IllegalStateException
IllegalStateException
public int getItemCount()
public byte getItemType(int i) throws IllegalArgumentException
IllegalArgumentException
public String getCPClass(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileException
IllegalArgumentException
public String getCPMethodType(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileException
IllegalArgumentException
public String getCPString(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileException
IllegalArgumentException
public static boolean isRef(byte b)
public String getCPRefClass(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileException
IllegalArgumentException
public String getCPRefName(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileException
IllegalArgumentException
public String getCPRefType(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileException
IllegalArgumentException
public String getCPNATName(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileException
IllegalArgumentException
public String getCPNATType(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileException
IllegalArgumentException
public String getCPHandleName(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileException
IllegalArgumentException
public String getCPHandleType(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileException
IllegalArgumentException
public String getCPHandleClass(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileException
IllegalArgumentException
public byte getCPHandleKind(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileException
IllegalArgumentException
public int getCPInt(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileException
IllegalArgumentException
public float getCPFloat(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileException
IllegalArgumentException
public long getCPLong(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileException
IllegalArgumentException
public double getCPDouble(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileException
IllegalArgumentException
public BootstrapMethodsReader.BootstrapMethod getCPDynBootstrap(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileException
IllegalArgumentException
public String getCPDynName(int i) throws InvalidClassFileException, IllegalArgumentException
public String getCPDynType(int i) throws InvalidClassFileException, IllegalArgumentException
public String getCPUtf8(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileException
IllegalArgumentException