Package de.inetsoftware.classparser
Class ConstantPool
java.lang.Object
de.inetsoftware.classparser.ConstantPool
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
private final Object[]
-
Constructor Summary
ConstructorsConstructorDescriptionConstantPool
(DataInputStream input) https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.4 -
Method Summary
-
Field Details
-
constantPool
-
CONSTANT_Utf8
public static final int CONSTANT_Utf8- See Also:
-
CONSTANT_Integer
public static final int CONSTANT_Integer- See Also:
-
CONSTANT_Float
public static final int CONSTANT_Float- See Also:
-
CONSTANT_Long
public static final int CONSTANT_Long- See Also:
-
CONSTANT_Double
public static final int CONSTANT_Double- See Also:
-
CONSTANT_Class
public static final int CONSTANT_Class- See Also:
-
CONSTANT_String
public static final int CONSTANT_String- See Also:
-
CONSTANT_Fieldref
public static final int CONSTANT_Fieldref- See Also:
-
CONSTANT_Methodref
public static final int CONSTANT_Methodref- See Also:
-
CONSTANT_InterfaceMethodref
public static final int CONSTANT_InterfaceMethodref- See Also:
-
CONSTANT_NameAndType
public static final int CONSTANT_NameAndType- See Also:
-
CONSTANT_MethodHandle
public static final int CONSTANT_MethodHandle- See Also:
-
CONSTANT_MethodType
public static final int CONSTANT_MethodType- See Also:
-
CONSTANT_InvokeDynamic
public static final int CONSTANT_InvokeDynamic- See Also:
-
CONSTANT_Module
public static final int CONSTANT_Module- See Also:
-
CONSTANT_Package
public static final int CONSTANT_Package- See Also:
-
-
Constructor Details
-
ConstantPool
ConstantPool(DataInputStream input) throws IOException https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.4- Parameters:
input
- the stream of the class- Throws:
IOException
- if any IO error occur
-
-
Method Details
-
get
Get a object from the pool at the given index.- Parameters:
index
- the index- Returns:
- the object
-
set
Set a value in the constant pool.- Parameters:
index
- the indexvalue
- the new value
-
size
int size()Get the count of entries in the pool.- Returns:
- the count
-