Class ConstantPoolReader
java.lang.Object
com.ibm.wala.shrike.shrikeBT.ConstantPoolReader
This class provides read-only access to a constant pool. It gets subclassed for each class
reader/editor toolkit you want to work with.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringgetConstantPoolClassType(int index) Retrieve the value of a CONSTANT_Class constant pool item in JVM internal class format (e.g., java/lang/Object).abstract doublegetConstantPoolDouble(int index) Retrieve the value of a CONSTANT_Double constant pool item.getConstantPoolDynamicBootstrap(int index) abstract StringgetConstantPoolDynamicName(int index) abstract StringgetConstantPoolDynamicType(int index) abstract floatgetConstantPoolFloat(int index) Retrieve the value of a CONSTANT_Float constant pool item.abstract StringgetConstantPoolHandleClassType(int index) Retrieve the class part of the CONSTANT_FieldRef, CONSTANT_MethodRef, or CONSTANT_InterfaceMethodRef constant pool item pointed to by a CONSTANT_MethodHandle entry.abstract bytegetConstantPoolHandleKind(int index) abstract StringgetConstantPoolHandleName(int index) Retrieve the name part of the CONSTANT_FieldRef, CONSTANT_MethodRef, or CONSTANT_InterfaceMethodRef constant pool item pointed to by a CONSTANT_MethodHandle entry.abstract StringgetConstantPoolHandleType(int index) Retrieve the type part of the CONSTANT_FieldRef, CONSTANT_MethodRef, or CONSTANT_InterfaceMethodRef constant pool item pointed to by a CONSTANT_MethodHandle entry.abstract intgetConstantPoolInteger(int index) Retrieve the value of a CONSTANT_Integer constant pool item.abstract intgetConstantPoolItemType(int index) Retrieve the JVM constant pool item type (a Constants.CONSTANT_xxx value).abstract longgetConstantPoolLong(int index) Retrieve the value of a CONSTANT_Long constant pool item.abstract StringgetConstantPoolMemberClassType(int index) Retrieve the class part of a CONSTANT_FieldRef, CONSTANT_MethodRef, or CONSTANT_InterfaceMethodRef constant pool item, in JVM internal class format (e.g., java/lang/Object).abstract StringgetConstantPoolMemberName(int index) Retrieve the name part of a CONSTANT_FieldRef, CONSTANT_MethodRef, or CONSTANT_InterfaceMethodRef constant pool item, This method should be overridden by a toolkit-specific subclass.abstract StringgetConstantPoolMemberType(int index) Retrieve the type part of a CONSTANT_FieldRef, CONSTANT_MethodRef, or CONSTANT_InterfaceMethodRef constant pool item, in JVM internal type format (e.g., Ljava/lang/Object;).abstract StringgetConstantPoolMethodType(int index) Retrieve the value of a CONSTANT_MethodType constant pool item.abstract StringgetConstantPoolString(int index) Retrieve the value of a CONSTANT_String constant pool item.
-
Constructor Details
-
ConstantPoolReader
public ConstantPoolReader()
-
-
Method Details
-
getConstantPoolItemType
public abstract int getConstantPoolItemType(int index) Retrieve the JVM constant pool item type (a Constants.CONSTANT_xxx value). This method should be overridden by a toolkit-specific subclass.- Parameters:
index- the constant pool item to examine
-
getConstantPoolInteger
public abstract int getConstantPoolInteger(int index) Retrieve the value of a CONSTANT_Integer constant pool item. This method should be overridden by a toolkit-specific subclass.- Parameters:
index- the constant pool item to examine
-
getConstantPoolFloat
public abstract float getConstantPoolFloat(int index) Retrieve the value of a CONSTANT_Float constant pool item. This method should be overridden by a toolkit-specific subclass.- Parameters:
index- the constant pool item to examine
-
getConstantPoolLong
public abstract long getConstantPoolLong(int index) Retrieve the value of a CONSTANT_Long constant pool item. This method should be overridden by a toolkit-specific subclass.- Parameters:
index- the constant pool item to examine
-
getConstantPoolDouble
public abstract double getConstantPoolDouble(int index) Retrieve the value of a CONSTANT_Double constant pool item. This method should be overridden by a toolkit-specific subclass.- Parameters:
index- the constant pool item to examine
-
getConstantPoolString
Retrieve the value of a CONSTANT_String constant pool item. This method should be overridden by a toolkit-specific subclass.- Parameters:
index- the constant pool item to examine
-
getConstantPoolMethodType
Retrieve the value of a CONSTANT_MethodType constant pool item. This method should be overridden by a toolkit-specific subclass.- Parameters:
index- the constant pool item to examine
-
getConstantPoolClassType
Retrieve the value of a CONSTANT_Class constant pool item in JVM internal class format (e.g., java/lang/Object). This method should be overridden by a toolkit-specific subclass.- Parameters:
index- the constant pool item to examine
-
getConstantPoolMemberClassType
Retrieve the class part of a CONSTANT_FieldRef, CONSTANT_MethodRef, or CONSTANT_InterfaceMethodRef constant pool item, in JVM internal class format (e.g., java/lang/Object). This method should be overridden by a toolkit-specific subclass.- Parameters:
index- the constant pool item to examine
-
getConstantPoolMemberName
Retrieve the name part of a CONSTANT_FieldRef, CONSTANT_MethodRef, or CONSTANT_InterfaceMethodRef constant pool item, This method should be overridden by a toolkit-specific subclass.- Parameters:
index- the constant pool item to examine
-
getConstantPoolMemberType
Retrieve the type part of a CONSTANT_FieldRef, CONSTANT_MethodRef, or CONSTANT_InterfaceMethodRef constant pool item, in JVM internal type format (e.g., Ljava/lang/Object;). This method should be overridden by a toolkit-specific subclass.- Parameters:
index- the constant pool item to examine
-
getConstantPoolHandleClassType
Retrieve the class part of the CONSTANT_FieldRef, CONSTANT_MethodRef, or CONSTANT_InterfaceMethodRef constant pool item pointed to by a CONSTANT_MethodHandle entry. This method should be overridden by a toolkit-specific subclass.- Parameters:
index- the constant pool item to examine
-
getConstantPoolHandleName
Retrieve the name part of the CONSTANT_FieldRef, CONSTANT_MethodRef, or CONSTANT_InterfaceMethodRef constant pool item pointed to by a CONSTANT_MethodHandle entry. This method should be overridden by a toolkit-specific subclass.- Parameters:
index- the constant pool item to examine
-
getConstantPoolHandleType
Retrieve the type part of the CONSTANT_FieldRef, CONSTANT_MethodRef, or CONSTANT_InterfaceMethodRef constant pool item pointed to by a CONSTANT_MethodHandle entry. This method should be overridden by a toolkit-specific subclass.- Parameters:
index- the constant pool item to examine
-
getConstantPoolHandleKind
public abstract byte getConstantPoolHandleKind(int index) -
getConstantPoolDynamicBootstrap
-
getConstantPoolDynamicName
-
getConstantPoolDynamicType
-