Method Summary |
|
public ConstantInfo | addConstant(ConstantInfo constant) Will only insert into the pool if the constant is not already in the
pool. |
public ConstantClassInfo | addConstantClass(String className) Get or create a constant from the constant pool representing a class. |
public ConstantClassInfo | addConstantClass(String className, int dim) Get or create a constant from the constant pool representing an array
class. |
public ConstantClassInfo | addConstantClass(TypeDesc type) Get or create a constant from the constant pool representing a class. |
public ConstantMethodInfo | addConstantConstructor(String className, TypeDesc[] params) Get or create a constant from the constant pool representing a
constructor in any class. |
public ConstantDoubleInfo | addConstantDouble(double value) Get or create a constant double from the constant pool. |
public ConstantFieldInfo | addConstantField(String className, String fieldName, TypeDesc type) Get or create a constant from the constant pool representing a field in
any class. |
public ConstantFloatInfo | addConstantFloat(float value) Get or create a constant float from the constant pool. |
public ConstantIntegerInfo | addConstantInteger(int value) Get or create a constant integer from the constant pool. |
public ConstantInterfaceMethodInfo | addConstantInterfaceMethod(String className, String methodName, TypeDesc ret, TypeDesc[] params) Get or create a constant from the constant pool representing an
interface method in any interface. |
public ConstantLongInfo | addConstantLong(long value) Get or create a constant long from the constant pool. |
public ConstantMethodInfo | addConstantMethod(String className, String methodName, TypeDesc ret, TypeDesc[] params) Get or create a constant from the constant pool representing a method
in any class. |
public ConstantNameAndTypeInfo | addConstantNameAndType(String name, Descriptor type) Get or create a constant name and type structure from the constant pool. |
public ConstantNameAndTypeInfo | addConstantNameAndType(ConstantUTFInfo nameConstant, ConstantUTFInfo descConstant) Get or create a constant name and type structure from the constant pool. |
public ConstantStringInfo | addConstantString(String str) Get or create a constant string from the constant pool. |
public ConstantUTFInfo | addConstantUTF(String str) Get or create a constant UTF string from the constant pool. |
public Set | getAllConstants() Returns all the constants in the pool, in no particular order. |
public ConstantInfo | getConstant(int index) Returns a constant from the pool by index, or null if not found. |
public int | getSize() Returns the number of constants in the pool. |
public static ConstantPool | readFrom(DataInput din) |
public void | writeTo(DataOutput dout) |