Package de.inetsoftware.classparser
Class ConstantPool
- java.lang.Object
-
- de.inetsoftware.classparser.ConstantPool
-
public class ConstantPool extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
CONSTANT_Class
static int
CONSTANT_Double
static int
CONSTANT_Fieldref
static int
CONSTANT_Float
static int
CONSTANT_Integer
static int
CONSTANT_InterfaceMethodref
static int
CONSTANT_InvokeDynamic
static int
CONSTANT_Long
static int
CONSTANT_MethodHandle
static int
CONSTANT_Methodref
static int
CONSTANT_MethodType
static int
CONSTANT_Module
static int
CONSTANT_NameAndType
static int
CONSTANT_Package
static int
CONSTANT_String
static int
CONSTANT_Utf8
private java.lang.Object[]
constantPool
-
Constructor Summary
Constructors Constructor Description ConstantPool(java.io.DataInputStream input)
https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.4
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
get(int index)
Get a object from the pool at the given index.(package private) void
set(int index, java.lang.Object value)
Set a value in the constant pool.(package private) int
size()
Get the count of entries in the pool.
-
-
-
Field Detail
-
constantPool
private final java.lang.Object[] constantPool
-
CONSTANT_Utf8
public static final int CONSTANT_Utf8
- See Also:
- Constant Field Values
-
CONSTANT_Integer
public static final int CONSTANT_Integer
- See Also:
- Constant Field Values
-
CONSTANT_Float
public static final int CONSTANT_Float
- See Also:
- Constant Field Values
-
CONSTANT_Long
public static final int CONSTANT_Long
- See Also:
- Constant Field Values
-
CONSTANT_Double
public static final int CONSTANT_Double
- See Also:
- Constant Field Values
-
CONSTANT_Class
public static final int CONSTANT_Class
- See Also:
- Constant Field Values
-
CONSTANT_String
public static final int CONSTANT_String
- See Also:
- Constant Field Values
-
CONSTANT_Fieldref
public static final int CONSTANT_Fieldref
- See Also:
- Constant Field Values
-
CONSTANT_Methodref
public static final int CONSTANT_Methodref
- See Also:
- Constant Field Values
-
CONSTANT_InterfaceMethodref
public static final int CONSTANT_InterfaceMethodref
- See Also:
- Constant Field Values
-
CONSTANT_NameAndType
public static final int CONSTANT_NameAndType
- See Also:
- Constant Field Values
-
CONSTANT_MethodHandle
public static final int CONSTANT_MethodHandle
- See Also:
- Constant Field Values
-
CONSTANT_MethodType
public static final int CONSTANT_MethodType
- See Also:
- Constant Field Values
-
CONSTANT_InvokeDynamic
public static final int CONSTANT_InvokeDynamic
- See Also:
- Constant Field Values
-
CONSTANT_Module
public static final int CONSTANT_Module
- See Also:
- Constant Field Values
-
CONSTANT_Package
public static final int CONSTANT_Package
- See Also:
- Constant Field Values
-
-
Method Detail
-
get
public java.lang.Object get(int index)
Get a object from the pool at the given index.- Parameters:
index
- the index- Returns:
- the object
-
set
void set(int index, java.lang.Object value)
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
-
-