Package org.openjdk.asmtools.jasm
Class ConstantPool
- java.lang.Object
-
- org.openjdk.asmtools.jasm.ConstantPool
-
- All Implemented Interfaces:
java.lang.Iterable<ConstantPool.ConstCell>
public class ConstantPool extends java.lang.Object implements java.lang.Iterable<ConstantPool.ConstCell>
ConstantPool ConstantPool is the class responsible for maintaining constants for a given class file.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConstantPool.ConstCell
ConstantCell ConstantCell is a type of data that can be in a constant pool.static class
ConstantPool.ConstValue
ConstValue A (typed) tagged value in the constant pool.static class
ConstantPool.ConstValue_Cell
ConstValue A (typed) tagged value in the constant pool.static class
ConstantPool.ConstValue_CondyPair
ConstValue A (typed) tagged value in the constant pool.static class
ConstantPool.ConstValue_IndyOrCondyPair
static class
ConstantPool.ConstValue_IndyPair
ConstValue A (typed) tagged value in the constant pool.static class
ConstantPool.ConstValue_Integer
ConstValue A (typed) tagged value in the constant pool.static class
ConstantPool.ConstValue_Long
ConstValue A (typed) tagged value in the constant pool.static class
ConstantPool.ConstValue_Pair
ConstValue A (typed) tagged value in the constant pool.static class
ConstantPool.ConstValue_String
ConstValue A (typed) tagged value in the constant pool.static class
ConstantPool.ConstValue_Zero
ConstValue A (typed) tagged value in the constant pool.static class
ConstantPool.CPTagVisitor<R>
CPVisitor CPVisitor base class defining a visitor for decoding constants.static class
ConstantPool.CPVisitor<R>
CPVisitor CPVisitor base class defining a visitor for decoding constants.static class
ConstantPool.ReferenceRank
-
Field Summary
Fields Modifier and Type Field Description private ConstantPool.ConstCell
constant_0
private ConstantPool.ConstValue
ConstValue0
(package private) java.util.Hashtable<ConstantPool.ConstValue,ConstantPool.ConstCell>
cpoolHashByValue
private static boolean
debugCP
Environment
env
private ConstantPool.CPVisitor<java.lang.Void>
fixCPVstr
private ConstantPool.ConstCell
nullConst
private java.util.ArrayList<ConstantPool.ConstCell>
pool
-
Constructor Summary
Constructors Constructor Description ConstantPool(Environment env)
main constructor
-
Method Summary
-
-
-
Field Detail
-
pool
private java.util.ArrayList<ConstantPool.ConstCell> pool
-
ConstValue0
private final ConstantPool.ConstValue ConstValue0
-
nullConst
private final ConstantPool.ConstCell nullConst
-
constant_0
private final ConstantPool.ConstCell constant_0
-
cpoolHashByValue
java.util.Hashtable<ConstantPool.ConstValue,ConstantPool.ConstCell> cpoolHashByValue
-
env
public Environment env
-
debugCP
private static boolean debugCP
-
fixCPVstr
private ConstantPool.CPVisitor<java.lang.Void> fixCPVstr
-
-
Constructor Detail
-
ConstantPool
public ConstantPool(Environment env)
main constructor- Parameters:
env
- The error reporting environment
-
-
Method Detail
-
debugStr
public void debugStr(java.lang.String s)
-
iterator
public java.util.Iterator<ConstantPool.ConstCell> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<ConstantPool.ConstCell>
-
fixRefsInPool
public void fixRefsInPool()
-
CheckGlobals
protected void CheckGlobals()
-
checkAndFixCPRef
private void checkAndFixCPRef(int i, ConstantPool.ConstCell item)
-
printPool
public void printPool()
-
cpool_get
private ConstantPool.ConstCell cpool_get(int cpx)
-
cpool_set
private void cpool_set(int cpx, ConstantPool.ConstCell cell, int sz)
-
uncheckedGetCell
protected ConstantPool.ConstCell uncheckedGetCell(int cpx)
-
getCell
public ConstantPool.ConstCell getCell(int cpx)
-
setCell
public void setCell(int cpx, ConstantPool.ConstCell cell)
-
NumberizePool
protected void NumberizePool()
-
FindCell
public ConstantPool.ConstCell FindCell(ConstantPool.ConstValue ref)
-
FindCell
public ConstantPool.ConstCell FindCell(Tables.ConstType tag, java.lang.String value)
-
FindCell
public ConstantPool.ConstCell FindCell(Tables.ConstType tag, java.lang.Integer value)
-
FindCell
public ConstantPool.ConstCell FindCell(Tables.ConstType tag, java.lang.Long value)
-
FindCell
public ConstantPool.ConstCell FindCell(Tables.ConstType tag, ConstantPool.ConstCell value)
-
FindCell
public ConstantPool.ConstCell FindCell(Tables.ConstType tag, ConstantPool.ConstCell left, ConstantPool.ConstCell right)
-
FindCellAsciz
public ConstantPool.ConstCell FindCellAsciz(java.lang.String str)
-
FindCellClassByName
public ConstantPool.ConstCell FindCellClassByName(java.lang.String name)
-
FindCellModuleByName
public ConstantPool.ConstCell FindCellModuleByName(java.lang.String name)
-
FindCellPackageByName
public ConstantPool.ConstCell FindCellPackageByName(java.lang.String name)
-
write
public void write(CheckedDataOutputStream out) throws java.io.IOException
- Throws:
java.io.IOException
-
-