Package aQute.bnd.classfile
Class ConstantPool
- java.lang.Object
-
- aQute.bnd.classfile.ConstantPool
-
- Direct Known Subclasses:
MutableConstantPool
public class ConstantPool extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConstantPool.AbstractDynamicInfo
static class
ConstantPool.AbstractRefInfo
static class
ConstantPool.ClassInfo
static class
ConstantPool.DynamicInfo
static class
ConstantPool.FieldrefInfo
static interface
ConstantPool.Info
static class
ConstantPool.InterfaceMethodrefInfo
static class
ConstantPool.InvokeDynamicInfo
static class
ConstantPool.MethodHandleInfo
static class
ConstantPool.MethodrefInfo
static class
ConstantPool.MethodTypeInfo
static class
ConstantPool.ModuleInfo
static class
ConstantPool.NameAndTypeInfo
static class
ConstantPool.PackageInfo
static interface
ConstantPool.RefInfoFunction
static class
ConstantPool.StringInfo
-
Field Summary
Fields Modifier and Type Field Description static int
CONSTANT_Class
static int
CONSTANT_Double
static int
CONSTANT_Dynamic
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
-
Constructor Summary
Constructors Constructor Description ConstantPool(java.lang.Object[] pool)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <I> int
add(java.lang.Class<I> infoType, java.util.function.Supplier<I> supplier)
int
classInfo(java.lang.String class_name)
java.lang.String
className(int class_info_index)
int
doubleInfo(double constant)
int
doubleInfo(java.lang.Double constant)
int
dynamicInfo(int bootstrap_method_attr_index, java.lang.String name, java.lang.String descriptor)
<T> T
entry(int index)
int
fieldrefInfo(java.lang.String class_name, java.lang.String name, java.lang.String descriptor)
int
floatInfo(float constant)
int
floatInfo(java.lang.Float constant)
protected <I> int
index(java.lang.Class<I> infoType, java.util.function.Predicate<I> match, java.util.function.Supplier<I> supplier)
int
integerInfo(int constant)
int
integerInfo(java.lang.Boolean constant)
int
integerInfo(java.lang.Byte constant)
int
integerInfo(java.lang.Character constant)
int
integerInfo(java.lang.Integer constant)
int
integerInfo(java.lang.Short constant)
int
interfaceMethodrefInfo(java.lang.String class_name, java.lang.String name, java.lang.String descriptor)
int
invokeDynamicInfo(int bootstrap_method_attr_index, java.lang.String name, java.lang.String descriptor)
int
longInfo(long constant)
int
longInfo(java.lang.Long constant)
int
methodHandleInfo(int reference_kind, java.lang.String class_name, java.lang.String name, java.lang.String descriptor, ConstantPool.RefInfoFunction refInfoFunction)
int
methodrefInfo(java.lang.String class_name, java.lang.String name, java.lang.String descriptor)
int
methodTypeInfo(java.lang.String descriptor)
int
moduleInfo(java.lang.String module_name)
java.lang.String
moduleName(int module_info_index)
int
nameAndTypeInfo(java.lang.String name, java.lang.String descriptor)
int
packageInfo(java.lang.String package_name)
java.lang.String
packageName(int package_info_index)
static ConstantPool
read(java.io.DataInput in)
int
size()
java.lang.String
string(int string_info_index)
int
stringInfo(java.lang.String string)
int
tag(int index)
java.lang.String
toString()
java.lang.String
utf8(int utf8_index)
int
utf8Info(java.lang.String utf8)
void
write(java.io.DataOutput out)
-
-
-
Field Detail
-
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_Dynamic
public static final int CONSTANT_Dynamic
- 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
-
size
public int size()
-
entry
public <T> T entry(int index)
-
tag
public int tag(int index)
-
utf8
public java.lang.String utf8(int utf8_index)
-
className
public java.lang.String className(int class_info_index)
-
moduleName
public java.lang.String moduleName(int module_info_index)
-
packageName
public java.lang.String packageName(int package_info_index)
-
string
public java.lang.String string(int string_info_index)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
read
public static ConstantPool read(java.io.DataInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
index
protected <I> int index(java.lang.Class<I> infoType, java.util.function.Predicate<I> match, java.util.function.Supplier<I> supplier)
-
add
protected <I> int add(java.lang.Class<I> infoType, java.util.function.Supplier<I> supplier)
-
integerInfo
public int integerInfo(int constant)
-
integerInfo
public int integerInfo(java.lang.Integer constant)
-
integerInfo
public int integerInfo(java.lang.Byte constant)
-
integerInfo
public int integerInfo(java.lang.Character constant)
-
integerInfo
public int integerInfo(java.lang.Short constant)
-
integerInfo
public int integerInfo(java.lang.Boolean constant)
-
longInfo
public int longInfo(java.lang.Long constant)
-
longInfo
public int longInfo(long constant)
-
floatInfo
public int floatInfo(java.lang.Float constant)
-
floatInfo
public int floatInfo(float constant)
-
doubleInfo
public int doubleInfo(java.lang.Double constant)
-
doubleInfo
public int doubleInfo(double constant)
-
utf8Info
public int utf8Info(java.lang.String utf8)
-
stringInfo
public int stringInfo(java.lang.String string)
-
moduleInfo
public int moduleInfo(java.lang.String module_name)
-
packageInfo
public int packageInfo(java.lang.String package_name)
-
classInfo
public int classInfo(java.lang.String class_name)
-
fieldrefInfo
public int fieldrefInfo(java.lang.String class_name, java.lang.String name, java.lang.String descriptor)
-
methodrefInfo
public int methodrefInfo(java.lang.String class_name, java.lang.String name, java.lang.String descriptor)
-
interfaceMethodrefInfo
public int interfaceMethodrefInfo(java.lang.String class_name, java.lang.String name, java.lang.String descriptor)
-
nameAndTypeInfo
public int nameAndTypeInfo(java.lang.String name, java.lang.String descriptor)
-
methodHandleInfo
public int methodHandleInfo(int reference_kind, java.lang.String class_name, java.lang.String name, java.lang.String descriptor, ConstantPool.RefInfoFunction refInfoFunction)
-
methodTypeInfo
public int methodTypeInfo(java.lang.String descriptor)
-
dynamicInfo
public int dynamicInfo(int bootstrap_method_attr_index, java.lang.String name, java.lang.String descriptor)
-
invokeDynamicInfo
public int invokeDynamicInfo(int bootstrap_method_attr_index, java.lang.String name, java.lang.String descriptor)
-
write
public void write(java.io.DataOutput out) throws java.io.IOException
- Throws:
java.io.IOException
-
-