-
- All Implemented Interfaces:
-
java.io.Serializable,kotlin.Comparable,org.gjt.jclasslib.structures.ClassFileEnum
public enum ConstantType extends Enum<ConstantType> implements ClassFileEnum
Describes all different constant types in the constant pool of a class file.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classConstantType.Companion
-
Enum Constant Summary
Enum Constants Enum Constant Description CLASSFIELDREFMETHODREFINTERFACE_METHODREFSTRINGINTEGERFLOATLONGSee ConstantLongInfo
DOUBLENAME_AND_TYPEMETHOD_TYPEMETHOD_HANDLEINVOKE_DYNAMICUTF8See ConstantUtf8Info
MODULEPACKAGEDYNAMIC
-
Method Summary
Modifier and Type Method Description final Constantread(ClassFile classFile, DataInput input)Read the corresponding constant pool structure from the input stream. StringtoString()Verbose description of the constant type. final ConstantTypevalueOf(String value)Returns the enum constant of this type with the specified name. final Array<ConstantType>values()Returns an array containing the constants of this enum type, in the order they're declared. final IntegergetExtraEntryCount()IntegergetTag()The bytecode tag representing the enum value. final StringgetVerbose()the name of the constant type as used in the class file format spec final IntegergetSize()the fixed extra size of the constant pool entry -
-
Method Detail
-
read
final Constant read(ClassFile classFile, DataInput input)
Read the corresponding constant pool structure from the input stream.
- Parameters:
classFile- the class file of which this structure is part ofinput- the input stream from which to read the structure.
-
valueOf
final ConstantType valueOf(String value)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
-
values
final Array<ConstantType> values()
Returns an array containing the constants of this enum type, in the order they're declared.
This method may be used to iterate over the constants.
-
getExtraEntryCount
final Integer getExtraEntryCount()
-
getVerbose
final String getVerbose()
the name of the constant type as used in the class file format spec
-
-
-
-