public static final class ClassFileWriter.ConstPoolWriter
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
int |
addClassInfo(int name)
Adds a new
CONSTANT_Class_info structure. |
int |
addClassInfo(java.lang.String jvmname)
Adds a new
CONSTANT_Class_info structure. |
int[] |
addClassInfo(java.lang.String[] classNames)
Makes
CONSTANT_Class_info objects for each class name. |
int |
addDoubleInfo(double d)
Adds a new
CONSTANT_Double_info
structure. |
int |
addFieldrefInfo(int classInfo,
int nameAndTypeInfo)
Adds a new
CONSTANT_Fieldref_info structure. |
int |
addFloatInfo(float f)
Adds a new
CONSTANT_Float_info
structure. |
int |
addIntegerInfo(int i)
Adds a new
CONSTANT_Integer_info
structure. |
int |
addInterfaceMethodrefInfo(int classInfo,
int nameAndTypeInfo)
Adds a new
CONSTANT_InterfaceMethodref_info
structure. |
int |
addInvokeDynamicInfo(int bootstrap,
int nameAndTypeInfo)
Adds a new
CONSTANT_InvokeDynamic_info
structure. |
int |
addLongInfo(long l)
Adds a new
CONSTANT_Long_info
structure. |
int |
addMethodHandleInfo(int kind,
int index)
Adds a new
CONSTANT_MethodHandle_info
structure. |
int |
addMethodrefInfo(int classInfo,
int nameAndTypeInfo)
Adds a new
CONSTANT_Methodref_info structure. |
int |
addMethodTypeInfo(int desc)
Adds a new
CONSTANT_MethodType_info
structure. |
int |
addNameAndTypeInfo(int name,
int type)
Adds a new
CONSTANT_NameAndType_info structure. |
int |
addNameAndTypeInfo(java.lang.String name,
java.lang.String type)
Adds a new
CONSTANT_NameAndType_info structure. |
int |
addStringInfo(java.lang.String str)
Adds a new
CONSTANT_String_info
structure. |
int |
addUtf8Info(java.lang.String utf8)
Adds a new
CONSTANT_Utf8_info
structure. |
public int[] addClassInfo(java.lang.String[] classNames)
CONSTANT_Class_info
objects for each class name.CONSTANT_Class_info
s.public int addClassInfo(java.lang.String jvmname)
CONSTANT_Class_info
structure.
This also adds a CONSTANT_Utf8_info
structure
for storing the class name.
jvmname
- the JVM-internal representation of a class name.
e.g. java/lang/Object
.public int addClassInfo(int name)
CONSTANT_Class_info
structure.name
- name_index
public int addNameAndTypeInfo(java.lang.String name, java.lang.String type)
CONSTANT_NameAndType_info
structure.name
- name_index
type
- descriptor_index
public int addNameAndTypeInfo(int name, int type)
CONSTANT_NameAndType_info
structure.name
- name_index
type
- descriptor_index
public int addFieldrefInfo(int classInfo, int nameAndTypeInfo)
CONSTANT_Fieldref_info
structure.classInfo
- class_index
nameAndTypeInfo
- name_and_type_index
.public int addMethodrefInfo(int classInfo, int nameAndTypeInfo)
CONSTANT_Methodref_info
structure.classInfo
- class_index
nameAndTypeInfo
- name_and_type_index
.public int addInterfaceMethodrefInfo(int classInfo, int nameAndTypeInfo)
CONSTANT_InterfaceMethodref_info
structure.classInfo
- class_index
nameAndTypeInfo
- name_and_type_index
.public int addMethodHandleInfo(int kind, int index)
CONSTANT_MethodHandle_info
structure.kind
- reference_kind
such as REF_invokeStatic
.index
- reference_index
.public int addMethodTypeInfo(int desc)
CONSTANT_MethodType_info
structure.desc
- descriptor_index
.public int addInvokeDynamicInfo(int bootstrap, int nameAndTypeInfo)
CONSTANT_InvokeDynamic_info
structure.bootstrap
- bootstrap_method_attr_index
.nameAndTypeInfo
- name_and_type_index
.public int addStringInfo(java.lang.String str)
CONSTANT_String_info
structure.
This also adds a new CONSTANT_Utf8_info
structure.
public int addIntegerInfo(int i)
CONSTANT_Integer_info
structure.public int addFloatInfo(float f)
CONSTANT_Float_info
structure.public int addLongInfo(long l)
CONSTANT_Long_info
structure.public int addDoubleInfo(double d)
CONSTANT_Double_info
structure.public int addUtf8Info(java.lang.String utf8)
CONSTANT_Utf8_info
structure.Javassist, a Java-bytecode translator toolkit.
Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.