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 class
ConstantCell ConstantCell is a type of data that can be in a constant pool.static class
ConstValue A (typed) tagged value in the constant pool.static class
ConstValue A (typed) tagged value in the constant pool.static class
ConstValue A (typed) tagged value in the constant pool.static class
static class
ConstValue A (typed) tagged value in the constant pool.static class
ConstValue A (typed) tagged value in the constant pool.static class
ConstValue A (typed) tagged value in the constant pool.static class
ConstValue A (typed) tagged value in the constant pool.static class
ConstValue A (typed) tagged value in the constant pool.static class
ConstValue A (typed) tagged value in the constant pool.static class
CPVisitor CPVisitor base class defining a visitor for decoding constants.static class
CPVisitor CPVisitor base class defining a visitor for decoding constants.static enum
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConstantPool.ConstCell
private final ConstantPool.ConstValue
(package private) Hashtable<ConstantPool.ConstValue,
ConstantPool.ConstCell> private static boolean
private ConstantPool.CPVisitor<Void>
private final ConstantPool.ConstCell
private ArrayList<ConstantPool.ConstCell>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
checkAndFixCPRef
(int i, ConstantPool.ConstCell item) protected void
private ConstantPool.ConstCell
cpool_get
(int cpx) private void
cpool_set
(int cpx, ConstantPool.ConstCell cell, int sz) void
FindCell
(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) void
getCell
(int cpx) iterator()
protected void
void
void
setCell
(int cpx, ConstantPool.ConstCell cell) protected ConstantPool.ConstCell
uncheckedGetCell
(int cpx) void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
iterator
in 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
-