- All Implemented Interfaces:
Serializable,Comparable<TypeKind>,Constable
Describes the types that can be part of a field or method descriptor.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionthe primitive type booleanthe primitive type bytethe primitive type charthe primitive type doublethe primitive type floatthe primitive type intthe primitive type longa reference typethe primitive type shortvoid -
Method Summary
Modifier and TypeMethodDescriptionErase this type kind to the type which will be used for xLOAD, xSTORE, and xRETURN bytecodesReturns the field descriptor character corresponding to this type.static TypeKindfrom(TypeDescriptor.OfField<?> descriptor) Returns the type kind associated with the specified field descriptor.static TypeKindReturns the type kind associated with the specified field descriptor.static TypeKindfromNewArrayCode(int newarraycode) Returns the type kind associated with the array type described by the array code used as an operand tonewarray.intReturns the code used by thenewarrayopcode corresponding to this type.intslotSize()Returns the number of local variable slots consumed by this type.typeName()Returns the human-readable name corresponding to this type.static TypeKindReturns the enum constant of this class with the specified name.static TypeKind[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ByteType
the primitive type byte -
ShortType
the primitive type short -
IntType
the primitive type int -
FloatType
the primitive type float -
LongType
the primitive type long -
DoubleType
the primitive type double -
ReferenceType
a reference type -
CharType
the primitive type char -
BooleanType
the primitive type boolean -
VoidType
void
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
typeName
Returns the human-readable name corresponding to this type.- Returns:
- the human-readable name corresponding to this type
-
descriptor
Returns the field descriptor character corresponding to this type.- Returns:
- the field descriptor character corresponding to this type
-
newarraycode
public int newarraycode()Returns the code used by thenewarrayopcode corresponding to this type.- Returns:
- the code used by the
newarrayopcode corresponding to this type
-
slotSize
public int slotSize()Returns the number of local variable slots consumed by this type.- Returns:
- the number of local variable slots consumed by this type
-
asLoadable
Erase this type kind to the type which will be used for xLOAD, xSTORE, and xRETURN bytecodes- Returns:
- the erased type kind
-
fromNewArrayCode
Returns the type kind associated with the array type described by the array code used as an operand tonewarray.- Parameters:
newarraycode- the operand of thenewarrayinstruction- Returns:
- the type kind associated with the array type described by the
array code used as an operand to
newarray
-
fromDescriptor
Returns the type kind associated with the specified field descriptor.- Parameters:
s- the field descriptor- Returns:
- the type kind associated with the specified field descriptor
-
from
Returns the type kind associated with the specified field descriptor.- Parameters:
descriptor- the field descriptor- Returns:
- the type kind associated with the specified field descriptor
-