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 classConstantPool.DoubleConstantstatic classConstantPool.Entrystatic classConstantPool.FieldReferencestatic classConstantPool.FloatConstantstatic classConstantPool.IntegerConstantstatic classConstantPool.InterfaceMethodReferencestatic classConstantPool.InvokeDynamicInfoprivate static classConstantPool.Keystatic classConstantPool.LongConstantstatic classConstantPool.MethodHandlestatic classConstantPool.MethodReferencestatic classConstantPool.MethodTypestatic classConstantPool.NameAndTypeDescriptorstatic classConstantPool.ReferenceEntrystatic classConstantPool.ReferenceKindstatic classConstantPool.StringConstantstatic classConstantPool.Tagstatic classConstantPool.TypeInfostatic classConstantPool.Utf8StringConstantstatic interfaceConstantPool.Visitor<R,P>private static classConstantPool.Writer
-
Field Summary
Fields Modifier and Type Field Description private java.util.HashMap<ConstantPool.Key,ConstantPool.Entry>_entryMapprivate ConstantPool.Key_lookupKeyprivate ConstantPool.Key_newKeyprivate java.util.ArrayList<ConstantPool.Entry>_poolprivate int_size(package private) java.util.HashSet<Type<?>>referencedInnerTypesprivate static ConstantPool.WriterWRITER
-
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)
-
-