Method Summary |
|
public int | addEntry(ConstantPoolEntry entry) Add an entry to the constant pool.
Parameters: entry - the new entry to be added to the constant pool. |
public int | getClassEntry(String className) Get the index of a given CONSTANT_CLASS entry in the constant pool.
Parameters: className - the name of the class for which the class entryindex is required. |
public int | getConstantEntry(Object constantValue) Get the index of a given constant value entry in the constant pool.
Parameters: constantValue - the constant value for which the index isrequired. |
public ConstantPoolEntry | getEntry(int index) Get an constant pool entry at a particular index.
Parameters: index - the index into the constant pool. |
public int | getFieldRefEntry(String fieldClassName, String fieldName, String fieldType) Get the index of a given CONSTANT_FIELDREF entry in the constant
pool.
Parameters: fieldClassName - the name of the class which contains the fieldbeing referenced. Parameters: fieldName - the name of the field being referenced. Parameters: fieldType - the type descriptor of the field being referenced. |
public int | getInterfaceMethodRefEntry(String interfaceMethodClassName, String interfaceMethodName, String interfaceMethodType) Get the index of a given CONSTANT_INTERFACEMETHODREF entry in the
constant pool.
Parameters: interfaceMethodClassName - the name of the interface whichcontains the method being referenced. Parameters: interfaceMethodName - the name of the method being referenced. Parameters: interfaceMethodType - the type descriptor of the method beingreferenced. |
public int | getMethodRefEntry(String methodClassName, String methodName, String methodType) Get the index of a given CONSTANT_METHODREF entry in the constant
pool.
Parameters: methodClassName - the name of the class which contains themethod being referenced. Parameters: methodName - the name of the method being referenced. Parameters: methodType - the type descriptor of the method being referenced. |
public int | getNameAndTypeEntry(String name, String type) Get the index of a given CONSTANT_NAMEANDTYPE entry in the constant
pool. |
public int | getUTF8Entry(String value) Get the index of a given UTF8 constant pool entry.
Parameters: value - the string value of the UTF8 entry. |
public void | read(DataInputStream classStream) Read the constant pool from a class input stream. |
public void | resolve() Resolve the entries in the constant pool. |
public int | size() Get the size of the constant pool. |
public String | toString() Dump the constant pool to a string. |