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 - InvalidClassFileExceptionpublic byte[] getRawBytes()
public int getRawOffset()
throws IllegalStateException
IllegalStateExceptionpublic int getRawSize()
throws IllegalStateException
IllegalStateExceptionpublic int getItemCount()
public byte getItemType(int i)
throws IllegalArgumentException
IllegalArgumentExceptionpublic String getCPClass(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileExceptionIllegalArgumentExceptionpublic String getCPMethodType(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileExceptionIllegalArgumentExceptionpublic String getCPString(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileExceptionIllegalArgumentExceptionpublic static boolean isRef(byte b)
public String getCPRefClass(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileExceptionIllegalArgumentExceptionpublic String getCPRefName(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileExceptionIllegalArgumentExceptionpublic String getCPRefType(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileExceptionIllegalArgumentExceptionpublic String getCPNATName(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileExceptionIllegalArgumentExceptionpublic String getCPNATType(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileExceptionIllegalArgumentExceptionpublic String getCPHandleName(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileExceptionIllegalArgumentExceptionpublic String getCPHandleType(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileExceptionIllegalArgumentExceptionpublic String getCPHandleClass(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileExceptionIllegalArgumentExceptionpublic byte getCPHandleKind(int i)
throws InvalidClassFileException,
IllegalArgumentException
InvalidClassFileExceptionIllegalArgumentExceptionpublic int getCPInt(int i)
throws InvalidClassFileException,
IllegalArgumentException
InvalidClassFileExceptionIllegalArgumentExceptionpublic float getCPFloat(int i)
throws InvalidClassFileException,
IllegalArgumentException
InvalidClassFileExceptionIllegalArgumentExceptionpublic long getCPLong(int i)
throws InvalidClassFileException,
IllegalArgumentException
InvalidClassFileExceptionIllegalArgumentExceptionpublic double getCPDouble(int i)
throws InvalidClassFileException,
IllegalArgumentException
InvalidClassFileExceptionIllegalArgumentExceptionpublic BootstrapMethodsReader.BootstrapMethod getCPDynBootstrap(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileExceptionIllegalArgumentExceptionpublic String getCPDynName(int i) throws InvalidClassFileException, IllegalArgumentException
public String getCPDynType(int i) throws InvalidClassFileException, IllegalArgumentException
public String getCPUtf8(int i) throws InvalidClassFileException, IllegalArgumentException
InvalidClassFileExceptionIllegalArgumentException