Package com.strobel.reflection.emit
Class ConstantPool
- java.lang.Object
-
- com.strobel.reflection.emit.ConstantPool
-
final class ConstantPool extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConstantPool.DoubleConstant
static class
ConstantPool.Entry
static class
ConstantPool.FieldReference
static class
ConstantPool.FloatConstant
static class
ConstantPool.IntegerConstant
static class
ConstantPool.InterfaceMethodReference
static class
ConstantPool.InvokeDynamicInfo
private static class
ConstantPool.Key
static class
ConstantPool.LongConstant
static class
ConstantPool.MethodHandle
static class
ConstantPool.MethodReference
static class
ConstantPool.MethodType
static class
ConstantPool.NameAndTypeDescriptor
static class
ConstantPool.ReferenceEntry
static class
ConstantPool.ReferenceKind
static class
ConstantPool.StringConstant
static class
ConstantPool.Tag
static class
ConstantPool.TypeInfo
static class
ConstantPool.Utf8StringConstant
static interface
ConstantPool.Visitor<R,P>
private static class
ConstantPool.Writer
-
Field Summary
Fields Modifier and Type Field Description private java.util.HashMap<ConstantPool.Key,ConstantPool.Entry>
_entryMap
private ConstantPool.Key
_lookupKey
private ConstantPool.Key
_newKey
private java.util.ArrayList<ConstantPool.Entry>
_pool
private int
_size
(package private) java.util.HashSet<Type<?>>
referencedInnerTypes
private static ConstantPool.Writer
WRITER
-
Constructor Summary
Constructors Constructor Description ConstantPool()
-
Method Summary
-
-
-
Field Detail
-
WRITER
private static final ConstantPool.Writer WRITER
-
_pool
private final java.util.ArrayList<ConstantPool.Entry> _pool
-
_entryMap
private final java.util.HashMap<ConstantPool.Key,ConstantPool.Entry> _entryMap
-
_lookupKey
private final ConstantPool.Key _lookupKey
-
_newKey
private final ConstantPool.Key _newKey
-
_size
private int _size
-
referencedInnerTypes
final java.util.HashSet<Type<?>> referencedInnerTypes
-
-
Method Detail
-
write
public void write(CodeStream stream)
-
get
public ConstantPool.Entry get(int index)
-
get
public ConstantPool.Entry get(int index, ConstantPool.Tag expectedType)
-
getUtf8StringConstant
public ConstantPool.Utf8StringConstant getUtf8StringConstant(java.lang.String value)
-
getStringConstant
public ConstantPool.StringConstant getStringConstant(java.lang.String value)
-
getIntegerConstant
public ConstantPool.IntegerConstant getIntegerConstant(int value)
-
getFloatConstant
public ConstantPool.FloatConstant getFloatConstant(float value)
-
getLongConstant
public ConstantPool.LongConstant getLongConstant(long value)
-
getDoubleConstant
public ConstantPool.DoubleConstant getDoubleConstant(double value)
-
getTypeInfo
public ConstantPool.TypeInfo getTypeInfo(Type<?> type)
-
getFieldReference
public ConstantPool.FieldReference getFieldReference(FieldInfo field)
-
getMethodReference
public ConstantPool.MethodReference getMethodReference(MethodBase method)
-
getInterfaceMethodReference
public ConstantPool.InterfaceMethodReference getInterfaceMethodReference(MethodInfo method)
-
getNameAndTypeDescriptor
ConstantPool.NameAndTypeDescriptor getNameAndTypeDescriptor(java.lang.String name, java.lang.String typeDescriptor)
-
getMethodHandle
ConstantPool.MethodHandle getMethodHandle(ConstantPool.ReferenceKind referenceKind, int referenceIndex)
-
getMethodType
ConstantPool.MethodType getMethodType(int descriptorIndex)
-
getInvokeDynamicInfo
ConstantPool.InvokeDynamicInfo getInvokeDynamicInfo(int bootstrapMethodAttributeIndex, int nameAndTypeDescriptorIndex)
-
-