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 intCONSTANT_Classstatic intCONSTANT_Doublestatic intCONSTANT_Fieldrefstatic intCONSTANT_Floatstatic intCONSTANT_Integerstatic intCONSTANT_InterfaceMethodrefstatic intCONSTANT_InvokeDynamicstatic intCONSTANT_Longstatic intCONSTANT_MethodHandlestatic intCONSTANT_Methodrefstatic intCONSTANT_MethodTypestatic intCONSTANT_Modulestatic intCONSTANT_NameAndTypestatic intCONSTANT_Packagestatic intCONSTANT_Stringstatic intCONSTANT_Utf8private 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.Objectget(int index)Get a object from the pool at the given index.(package private) voidset(int index, java.lang.Object value)Set a value in the constant pool.(package private) intsize()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
-
-