Interface IConstantPoolEntry
- All Known Subinterfaces:
IConstantPoolEntry2
,IConstantPoolEntry3
- All Known Implementing Classes:
ConstantPoolEntry
,ConstantPoolEntry2
public interface IConstantPoolEntry
Description of a constant pool entry as described in the JVM specifications.
Its contents is initialized according to its kind.
This interface may be implemented by clients. Because of that questionable choice,
clients may have to cast to
IConstantPoolEntry3
to get access to the relevant content.- Since:
- 2.0
- See Also:
IConstantPoolEntry2
,IConstantPoolEntry3
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the class index for a CONSTANT_Fieldref, CONSTANT_Methodref, CONSTANT_InterfaceMethodref type entry.char[]
Returns the class name for a CONSTANT_Class type entry.int
Returns the name index for a CONSTANT_Class type entry.char[]
Returns the class name for a CONSTANT_Fieldref, CONSTANT_Methodref, CONSTANT_InterfaceMethodref type entry.double
Returns the double value for a CONSTANT_Double type entry.char[]
Returns the field descriptor value for a CONSTANT_Fieldref type entry.char[]
Returns the field name for a CONSTANT_Fieldref type entry.float
Returns the float value for a CONSTANT_Float type entry.int
Returns the integer value for a CONSTANT_Integer type entry.int
getKind()
Returns the type of this entry.long
Returns the long value for a CONSTANT_Long type entry.char[]
Returns the method descriptor value for a CONSTANT_Methodref or CONSTANT_InterfaceMethodref type entry.char[]
Returns the method name for a CONSTANT_Methodref, CONSTANT_InterfaceMethodref or CONSTANT_InvokeDynamic type entry.int
Returns the nameAndType index for a CONSTANT_Fieldref, CONSTANT_Methodref, CONSTANT_InterfaceMethodref, CONSTANT_InvokeDynamic type entry.int
Returns the descriptor index for a CONSTANT_NameAndType type entry.int
Returns the name index for a CONSTANT_NameAndType type entry.int
Returns the string index for a CONSTANT_String type entry.Returns the string value for a CONSTANT_String type entry.int
Returns the utf8 length for a CONSTANT_Utf8 type entry.char[]
Returns the utf8 value for a CONSTANT_Utf8 type entry.
-
Method Details
-
getKind
int getKind()Returns the type of this entry.- Returns:
- the type of this entry
-
getClassInfoNameIndex
int getClassInfoNameIndex()Returns the name index for a CONSTANT_Class type entry. The value is unspecified otherwise.- Returns:
- the name index for a CONSTANT_Class type entry
- See Also:
IConstantPoolConstant.CONSTANT_Class
-
getClassIndex
int getClassIndex()Returns the class index for a CONSTANT_Fieldref, CONSTANT_Methodref, CONSTANT_InterfaceMethodref type entry. The value is unspecified otherwise.- Returns:
- the class index for a CONSTANT_Fieldref, CONSTANT_Methodref, CONSTANT_InterfaceMethodref type entry
- See Also:
IConstantPoolConstant.CONSTANT_Fieldref
,IConstantPoolConstant.CONSTANT_Methodref
,IConstantPoolConstant.CONSTANT_InterfaceMethodref
-
getNameAndTypeIndex
int getNameAndTypeIndex()Returns the nameAndType index for a CONSTANT_Fieldref, CONSTANT_Methodref, CONSTANT_InterfaceMethodref, CONSTANT_InvokeDynamic type entry. The value is unspecified otherwise.- Returns:
- the nameAndType index for a CONSTANT_Fieldref, CONSTANT_Methodref, CONSTANT_InterfaceMethodref, CONSTANT_InvokeDynamic type entry
- See Also:
IConstantPoolConstant.CONSTANT_Fieldref
,IConstantPoolConstant.CONSTANT_Methodref
,IConstantPoolConstant.CONSTANT_InterfaceMethodref
,IConstantPoolConstant.CONSTANT_InvokeDynamic
,IConstantPoolConstant.CONSTANT_Dynamic
-
getStringIndex
int getStringIndex()Returns the string index for a CONSTANT_String type entry. The value is unspecified otherwise.- Returns:
- the string index for a CONSTANT_String type entry
- See Also:
IConstantPoolConstant.CONSTANT_String
-
getStringValue
String getStringValue()Returns the string value for a CONSTANT_String type entry. Returns null otherwise.- Returns:
- the string value for a CONSTANT_String type entry
- See Also:
IConstantPoolConstant.CONSTANT_String
-
getIntegerValue
int getIntegerValue()Returns the integer value for a CONSTANT_Integer type entry. The value is unspecified otherwise.- Returns:
- the integer value for a CONSTANT_Integer type entry
- See Also:
IConstantPoolConstant.CONSTANT_Integer
-
getFloatValue
float getFloatValue()Returns the float value for a CONSTANT_Float type entry. The value is unspecified otherwise.- Returns:
- the float value for a CONSTANT_Float type entry
- See Also:
IConstantPoolConstant.CONSTANT_Float
-
getDoubleValue
double getDoubleValue()Returns the double value for a CONSTANT_Double type entry. The value is unspecified otherwise.- Returns:
- the double value for a CONSTANT_Double type entry
- See Also:
IConstantPoolConstant.CONSTANT_Double
-
getLongValue
long getLongValue()Returns the long value for a CONSTANT_Long type entry. The value is unspecified otherwise.- Returns:
- the long value for a CONSTANT_Long type entry
- See Also:
IConstantPoolConstant.CONSTANT_Long
-
getNameAndTypeInfoDescriptorIndex
int getNameAndTypeInfoDescriptorIndex()Returns the descriptor index for a CONSTANT_NameAndType type entry. The value is unspecified otherwise.- Returns:
- the descriptor index for a CONSTANT_NameAndType type entry
- See Also:
IConstantPoolConstant.CONSTANT_NameAndType
-
getNameAndTypeInfoNameIndex
int getNameAndTypeInfoNameIndex()Returns the name index for a CONSTANT_NameAndType type entry. The value is unspecified otherwise.- Returns:
- the name index for a CONSTANT_NameAndType type entry
- See Also:
IConstantPoolConstant.CONSTANT_NameAndType
-
getClassInfoName
char[] getClassInfoName()Returns the class name for a CONSTANT_Class type entry. Returns null otherwise.- Returns:
- the class name for a CONSTANT_Class type entry
- See Also:
IConstantPoolConstant.CONSTANT_Class
-
getClassName
char[] getClassName()Returns the class name for a CONSTANT_Fieldref, CONSTANT_Methodref, CONSTANT_InterfaceMethodref type entry. Returns null otherwise.- Returns:
- the class name for a CONSTANT_Fieldref, CONSTANT_Methodref, CONSTANT_InterfaceMethodref type entry
- See Also:
IConstantPoolConstant.CONSTANT_Fieldref
,IConstantPoolConstant.CONSTANT_Methodref
,IConstantPoolConstant.CONSTANT_InterfaceMethodref
-
getFieldName
char[] getFieldName()Returns the field name for a CONSTANT_Fieldref type entry. Returns null otherwise.- Returns:
- the field name for a CONSTANT_Fieldref type entry
- See Also:
IConstantPoolConstant.CONSTANT_Fieldref
-
getMethodName
char[] getMethodName()Returns the method name for a CONSTANT_Methodref, CONSTANT_InterfaceMethodref or CONSTANT_InvokeDynamic type entry. Returns null otherwise.- Returns:
- the method name for a CONSTANT_Methodref, CONSTANT_InterfaceMethodref or CONSTANT_InvokeDynamic type entry
- See Also:
IConstantPoolConstant.CONSTANT_Methodref
,IConstantPoolConstant.CONSTANT_InterfaceMethodref
,IConstantPoolConstant.CONSTANT_InvokeDynamic
,IConstantPoolConstant.CONSTANT_Dynamic
-
getFieldDescriptor
char[] getFieldDescriptor()Returns the field descriptor value for a CONSTANT_Fieldref type entry. This value is set only when decoding the CONSTANT_Fieldref entry. Returns null otherwise.- Returns:
- the field descriptor value for a CONSTANT_Fieldref type entry. This value is set only when decoding the CONSTANT_Fieldref entry
- See Also:
IConstantPoolConstant.CONSTANT_Fieldref
-
getMethodDescriptor
char[] getMethodDescriptor()Returns the method descriptor value for a CONSTANT_Methodref or CONSTANT_InterfaceMethodref type entry. This value is set only when decoding the CONSTANT_Methodref, CONSTANT_InterfaceMethodref, CONSTANT_MethodType or CONSTANT_InvokeDynamic entry. Returns null otherwise.- Returns:
- the method descriptor value for a CONSTANT_Methodref, CONSTANT_InterfaceMethodref type entry. This value is set only when decoding the CONSTANT_Methodref, CONSTANT_InterfaceMethodref, CONSTANT_MethodType or CONSTANT_InvokeDynamic entry
- See Also:
IConstantPoolConstant.CONSTANT_Methodref
,IConstantPoolConstant.CONSTANT_InterfaceMethodref
,IConstantPoolConstant.CONSTANT_MethodType
,IConstantPoolConstant.CONSTANT_InvokeDynamic
,IConstantPoolConstant.CONSTANT_Dynamic
-
getUtf8Value
char[] getUtf8Value()Returns the utf8 value for a CONSTANT_Utf8 type entry. This value is set only when decoding a UTF8 entry. Returns null otherwise.- Returns:
- the utf8 value for a CONSTANT_Utf8 type entry. This value is set only when decoding a UTF8 entry
- See Also:
IConstantPoolConstant.CONSTANT_Utf8
-
getUtf8Length
int getUtf8Length()Returns the utf8 length for a CONSTANT_Utf8 type entry. This value is set only when decoding a UTF8 entry. Returns null otherwise.- Returns:
- the utf8 length for a CONSTANT_Utf8 type entry. This value is set only when decoding a UTF8 entry
- See Also:
IConstantPoolConstant.CONSTANT_Utf8
-