# Uses of Enum Class
java.lang.classfile.TypeKind

Packages that use TypeKind
Package
Description
java.lang.classfile
Provides classfile parsing, generation, and transformation library.
java.lang.classfile.constantpool
Provides interfaces describing constant pool entries for the `java.lang.classfile` library.
java.lang.classfile.instruction
Provides interfaces describing code instructions for the `java.lang.classfile` library.

## Uses of TypeKind in java.lang.classfile

Subclasses with type arguments of type TypeKind in java.lang.classfile
Modifier and Type
Class
Description
`enum`
`TypeKind`
Describes the data types Java Virtual Machine operates on.
Methods in java.lang.classfile that return TypeKind
Modifier and Type
Method
Description
`TypeKind`
TypeKind.`asLoadable()`
Returns the computational type for this type, or `void` for `void`.
`static TypeKind`
TypeKind.`from(TypeDescriptor.OfField<?> descriptor)`
Returns the type associated with the specified field descriptor.
`static TypeKind`
TypeKind.`fromDescriptor(CharSequence s)`
Returns the type associated with the specified field descriptor.
`static TypeKind`
TypeKind.`fromNewarrayCode(int newarrayCode)`
Returns the component type described by the array code used as an operand to `newarray`.
`static TypeKind`
TypeKind.`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static TypeKind[]`
TypeKind.`values()`
Returns an array containing the constants of this enum class, in the order they are declared.
Methods in java.lang.classfile with parameters of type TypeKind
Modifier and Type
Method
Description
`int`
CodeBuilder.`allocateLocal(TypeKind typeKind)`
Returns the local variable slot of a fresh local variable.
`default CodeBuilder`
CodeBuilder.`arrayLoad(TypeKind tk)`
Generates an instruction to load from an array.
`default CodeBuilder`
CodeBuilder.`arrayStore(TypeKind tk)`
Generates an instruction to store into an array.
`default CodeBuilder`
CodeBuilder.`conversion(TypeKind fromType, TypeKind toType)`
Generates instruction(s) to convert `fromType` to `toType`.
`default CodeBuilder`
CodeBuilder.`loadLocal(TypeKind tk, int slot)`
Generates an instruction to load a value from a local variable.
`default CodeBuilder`
CodeBuilder.`newarray(TypeKind typeKind)`
Generates an instruction to create a new array of a primitive type.
`default CodeBuilder`
CodeBuilder.`return_(TypeKind tk)`
Generates a return instruction.
`default CodeBuilder`
CodeBuilder.`storeLocal(TypeKind tk, int slot)`
Generates an instruction to store a value to a local variable.

## Uses of TypeKind in java.lang.classfile.constantpool

Methods in java.lang.classfile.constantpool that return TypeKind
Modifier and Type
Method
Description
`default TypeKind`
ConstantDynamicEntry.`typeKind()`
Returns the data type of this constant.
`default TypeKind`
LoadableConstantEntry.`typeKind()`
Returns the data type of this constant.
`default TypeKind`
LongEntry.`typeKind()`
Returns the type of the constant.

## Uses of TypeKind in java.lang.classfile.instruction

Methods in java.lang.classfile.instruction that return TypeKind
Modifier and Type
Method
Description
`TypeKind`
ConvertInstruction.`fromType()`
Returns the source type to convert from.
`TypeKind`
ConvertInstruction.`toType()`
Returns the destination type to convert to.
`TypeKind`
ArrayLoadInstruction.`typeKind()`
Returns the component type of the array.
`TypeKind`
ArrayStoreInstruction.`typeKind()`
Returns the component type of the array.
`default TypeKind`
ConstantInstruction.ArgumentConstantInstruction.`typeKind()`
`default TypeKind`
ConstantInstruction.IntrinsicConstantInstruction.`typeKind()`
`default TypeKind`
ConstantInstruction.LoadConstantInstruction.`typeKind()`
`TypeKind`
ConstantInstruction.`typeKind()`
Returns the computational type of the constant.
`TypeKind`
LoadInstruction.`typeKind()`
Returns the computational type of the value to be loaded.
`TypeKind`
NewPrimitiveArrayInstruction.`typeKind()`
Returns the component type of the array.
`TypeKind`
OperatorInstruction.`typeKind()`
Returns the operand type of the instruction.
`TypeKind`
ReturnInstruction.`typeKind()`
Returns the computational type, including `void`, of the return instruction.
`TypeKind`
StoreInstruction.`typeKind()`
Returns the computational type of the value to be stored.
Methods in java.lang.classfile.instruction with parameters of type TypeKind
Modifier and Type
Method
Description
`static ConvertInstruction`
ConvertInstruction.`of(TypeKind fromType, TypeKind toType)`
Returns a conversion instruction.
`static LoadInstruction`
LoadInstruction.`of(TypeKind kind, int slot)`
Returns a local variable load instruction.
`static NewPrimitiveArrayInstruction`
NewPrimitiveArrayInstruction.`of(TypeKind typeKind)`
Returns a new primitive array instruction.
`static ReturnInstruction`
ReturnInstruction.`of(TypeKind typeKind)`
Returns a return instruction.
`static StoreInstruction`
StoreInstruction.`of(TypeKind kind, int slot)`
Returns a local variable store instruction.