Package com.strobel.assembler.ir
Class ConstantPool
java.lang.Object
com.strobel.core.Freezable
com.strobel.assembler.ir.ConstantPool
- All Implemented Interfaces:
IFreezable
,Iterable<ConstantPool.Entry>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static final class
static class
static final class
static final class
static final class
static final class
static class
private static final class
static final class
static class
static final class
static final class
static class
static class
static class
static class
static enum
static final class
static enum
static final class
static final class
static interface
private static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HashMap
<ConstantPool.Key, ConstantPool.Entry> private final ConstantPool.Key
private final ConstantPool.Key
private final ArrayList
<ConstantPool.Entry> private int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(ConstantPool.Visitor visitor) get
(int index) get
(int index, ConstantPool.Tag expectedType) getDoubleConstant
(double value) <T extends ConstantPool.Entry>
TgetEntry
(int index) getFieldReference
(FieldReference field) getFloatConstant
(float value) getIntegerConstant
(int value) (package private) ConstantPool.InvokeDynamicInfoEntry
getInvokeDynamicInfo
(int bootstrapMethodAttributeIndex, int nameAndTypeDescriptorIndex) getLongConstant
(long value) (package private) ConstantPool.MethodHandleEntry
getMethodHandle
(ConstantPool.ReferenceKind referenceKind, int referenceIndex) getMethodReference
(MethodReference method) (package private) ConstantPool.MethodTypeEntry
getMethodType
(int descriptorIndex) (package private) ConstantPool.NameAndTypeDescriptorEntry
getNameAndTypeDescriptor
(String name, String typeDescriptor) getStringConstant
(String value) getTypeInfo
(TypeReference type) getUtf8StringConstant
(String value) iterator()
<T> T
lookupConstant
(int index) double
lookupDoubleConstant
(int index) float
lookupFloatConstant
(int index) int
lookupIntegerConstant
(int index) long
lookupLongConstant
(int index) lookupStringConstant
(int index) lookupUtf8Constant
(int index) static ConstantPool
void
Methods inherited from class com.strobel.core.Freezable
canFreeze, freeze, freezeCore, freezeIfUnfrozen, isFrozen, tryFreeze, verifyFrozen, verifyNotFrozen
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
-
_entryMap
-
_lookupKey
-
_newKey
-
_size
private int _size
-
-
Constructor Details
-
ConstantPool
public ConstantPool()
-
-
Method Details
-
iterator
- Specified by:
iterator
in interfaceIterable<ConstantPool.Entry>
-
accept
-
write
-
getEntry
-
get
-
get
-
lookupStringConstant
-
lookupUtf8Constant
-
lookupConstant
public <T> T lookupConstant(int index) -
lookupIntegerConstant
public int lookupIntegerConstant(int index) -
lookupLongConstant
public long lookupLongConstant(int index) -
lookupFloatConstant
public float lookupFloatConstant(int index) -
lookupDoubleConstant
public double lookupDoubleConstant(int index) -
getUtf8StringConstant
-
getStringConstant
-
getIntegerConstant
-
getFloatConstant
-
getLongConstant
-
getDoubleConstant
-
getTypeInfo
-
getFieldReference
-
getMethodReference
-
getInterfaceMethodReference
public ConstantPool.InterfaceMethodReferenceEntry getInterfaceMethodReference(MethodReference method) -
getNameAndTypeDescriptor
ConstantPool.NameAndTypeDescriptorEntry getNameAndTypeDescriptor(String name, String typeDescriptor) -
getMethodHandle
ConstantPool.MethodHandleEntry getMethodHandle(ConstantPool.ReferenceKind referenceKind, int referenceIndex) -
getMethodType
-
getInvokeDynamicInfo
ConstantPool.InvokeDynamicInfoEntry getInvokeDynamicInfo(int bootstrapMethodAttributeIndex, int nameAndTypeDescriptorIndex) -
read
-