ConstantInstruction.IntrinsicConstantInstruction (Java SE 23 & JDK 23)
Description: declaration: module: java.base, package: java.lang.classfile.instruction, interface: ConstantInstruction, interface: IntrinsicConstantInstruction
Keywords: java.lang.classfile.instruction.ConstantInstruction.IntrinsicConstantInstruction interface

# Interface ConstantInstruction.IntrinsicConstantInstruction

All Superinterfaces:
  `ClassFileElementPREVIEW`, `CodeElementPREVIEW`, `ConstantInstructionPREVIEW`, `InstructionPREVIEW`

Enclosing interface:
  `ConstantInstructionPREVIEW`

public static sealed interface ConstantInstruction.IntrinsicConstantInstruction extends ConstantInstructionPREVIEW
`IntrinsicConstantInstruction` is a preview API of the Java platform.
Programs can only use `IntrinsicConstantInstruction` when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models an "intrinsic constant" instruction (e.g., `iconst_0`).

Since:
  22

- ## Nested Class Summary

  ### Nested classes/interfaces declared in interface java.lang.classfile.instruction.ConstantInstructionPREVIEW

  `ConstantInstruction.ArgumentConstantInstructionPREVIEW, ConstantInstruction.IntrinsicConstantInstructionPREVIEW, ConstantInstruction.LoadConstantInstructionPREVIEW`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default TypeKindPREVIEW`
  `typeKind()`
  Returns the type of the constant.

  ### Methods declared in interface java.lang.classfile.instruction.ConstantInstructionPREVIEW

  `constantValue`

  ### Methods declared in interface java.lang.classfile.InstructionPREVIEW

  `opcode, sizeInBytes`

- ## Method Details

  - ### typeKind

    default TypeKindPREVIEW typeKind()
    Returns the type of the constant.
    Specified by:
      `typeKind` in interface `ConstantInstructionPREVIEW`
    Returns:
      the type of the constant