Package org.openjdk.asmtools.jasm
Class ConstantPool
java.lang.Object
org.openjdk.asmtools.jasm.ConstantPool
- All Implemented Interfaces:
Iterable<ConstantPool.ConstCell>
ConstantPool
ConstantPool is the class responsible for maintaining constants for a given class file.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classConstantCell ConstantCell is a type of data that can be in a constant pool.static classConstValue A (typed) tagged value in the constant pool.static classConstValue A (typed) tagged value in the constant pool.static classConstValue A (typed) tagged value in the constant pool.static classstatic classConstValue A (typed) tagged value in the constant pool.static classConstValue A (typed) tagged value in the constant pool.static classConstValue A (typed) tagged value in the constant pool.static classConstValue A (typed) tagged value in the constant pool.static classConstValue A (typed) tagged value in the constant pool.static classConstValue A (typed) tagged value in the constant pool.static classCPVisitor CPVisitor base class defining a visitor for decoding constants.static classCPVisitor CPVisitor base class defining a visitor for decoding constants.static enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConstantPool.ConstCellprivate final ConstantPool.ConstValue(package private) Hashtable<ConstantPool.ConstValue, ConstantPool.ConstCell> private static booleanprivate ConstantPool.CPVisitor<Void> private final ConstantPool.ConstCellprivate ArrayList<ConstantPool.ConstCell> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcheckAndFixCPRef(int i, ConstantPool.ConstCell item) protected voidprivate ConstantPool.ConstCellcpool_get(int cpx) private voidcpool_set(int cpx, ConstantPool.ConstCell cell, int sz) voidFindCell(Tables.ConstType tag, Integer value) FindCell(Tables.ConstType tag, Long value) FindCell(Tables.ConstType tag, String value) FindCell(Tables.ConstType tag, ConstantPool.ConstCell value) FindCell(Tables.ConstType tag, ConstantPool.ConstCell left, ConstantPool.ConstCell right) FindCellAsciz(String str) FindCellClassByName(String name) FindCellModuleByName(String name) FindCellPackageByName(String name) voidgetCell(int cpx) iterator()protected voidvoidvoidsetCell(int cpx, ConstantPool.ConstCell cell) protected ConstantPool.ConstCelluncheckedGetCell(int cpx) voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
pool
-
ConstValue0
-
nullConst
-
constant_0
-
cpoolHashByValue
Hashtable<ConstantPool.ConstValue,ConstantPool.ConstCell> cpoolHashByValue -
env
-
debugCP
private static boolean debugCP -
fixCPVstr
-
-
Constructor Details
-
ConstantPool
main constructor- Parameters:
env- The error reporting environment
-
-
Method Details
-
debugStr
-
iterator
- Specified by:
iteratorin interfaceIterable<ConstantPool.ConstCell>
-
fixRefsInPool
public void fixRefsInPool() -
CheckGlobals
protected void CheckGlobals() -
checkAndFixCPRef
-
printPool
public void printPool() -
cpool_get
-
cpool_set
-
uncheckedGetCell
-
getCell
-
setCell
-
NumberizePool
protected void NumberizePool() -
FindCell
-
FindCell
-
FindCell
-
FindCell
-
FindCell
-
FindCell
public ConstantPool.ConstCell FindCell(Tables.ConstType tag, ConstantPool.ConstCell left, ConstantPool.ConstCell right) -
FindCellAsciz
-
FindCellClassByName
-
FindCellModuleByName
-
FindCellPackageByName
-
write
- Throws:
IOException
-