| java.lang.Object EDU.purdue.cs.bloat.editor.ConstantPool
ConstantPool | public ConstantPool(Constant[] c)(Code) | | Constructor. Resolve the constants in the constant pool, converting from
the index-based representation of the class file to a more amenable
external representation.
Parameters: c - An array of Constant. |
ConstantPool | public ConstantPool()(Code) | | Creates a new, empty ConstantPool
|
addConstant | public int addConstant(int tag, Object value)(Code) | | Add a constant to the constant pool. Will not add the same constant
twice.
Parameters: tag - The constant's tag (for example, Constant.UTF8). Parameters: value - The constant's value (for example, a String). The index of the constant. |
constantAt | public Object constantAt(int idx)(Code) | | Obtain the resolved value of a constant at given index in the constant
pool.
Parameters: idx - Index into the constant pool. The value of the constant at index. |
constantIndex | public int constantIndex(int tag, Object value)(Code) | | Get the index of the constant with the given tag and value.
Parameters: tag - The constant's tag (for example, Constant.UTF8). Parameters: value - The constant's value (for example, a String). The index of the constant. |
constantTag | public int constantTag(int index)(Code) | | Get the tag of a constant.
Parameters: index - Index into the constant pool. The tag of the constant at index, or Constant.UTF8. |
constants | public Constant[] constants()(Code) | | Get an array of the constants in the pool.
An array of the constants in the pool. |
getClassIndex | public int getClassIndex(Class c)(Code) | | Returns the index of the constant pool entry for the given class
|
getClassIndex | public int getClassIndex(Type type)(Code) | | Returns the index of the constant pool entry for the given class.
|
getConstantsList | public List getConstantsList()(Code) | | Returns an unmodifiable List of constants in this constant pool.
|
getDoubleIndex | public int getDoubleIndex(Double d)(Code) | | Returns the index of the constant pool entry for the given double
|
getFloatIndex | public int getFloatIndex(Float f)(Code) | | Returns the index of the constant pool entry for the given float
|
getIntegerIndex | public int getIntegerIndex(Integer i)(Code) | | Returns the index of the constant pool entry for the given integer
|
getLongIndex | public int getLongIndex(Long l)(Code) | | Returns the index of the constant pool entry for the given long
|
getMemberRefIndex | public int getMemberRefIndex(MemberRef ref)(Code) | | Returns the index of the constant pool entry for the given
MemberRef
|
getNameAndTypeIndex | public int getNameAndTypeIndex(NameAndType nat)(Code) | | Returns the index of the constant pool entry for the given
NameAndType
|
getStringIndex | public int getStringIndex(String s)(Code) | | Returns the index of the constant pool entry for the given String
|
getTypeIndex | public int getTypeIndex(Type type)(Code) | | Returns the index of the constant pool entry for the given
Type
|
getUTF8Index | public int getUTF8Index(String s)(Code) | | Returns the index of the constant pool entry for the given UTF8 string
|
numConstants | public int numConstants()(Code) | | |
|
|