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

# Interface DiscontinuedInstruction

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

All Known Subinterfaces:
  `DiscontinuedInstruction.JsrInstructionPREVIEW`, `DiscontinuedInstruction.RetInstructionPREVIEW`

public sealed interface DiscontinuedInstruction extends InstructionPREVIEW permits DiscontinuedInstruction.JsrInstructionPREVIEW, DiscontinuedInstruction.RetInstructionPREVIEW
`DiscontinuedInstruction` is a preview API of the Java platform.
Programs can only use `DiscontinuedInstruction` when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models instruction discontinued from the `code` array of a `Code` attribute. Delivered as a `CodeElement`PREVIEW when traversing the elements of a `CodeModel`PREVIEW.

Since:
  22

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static interface`
  `DiscontinuedInstruction.JsrInstructionPREVIEW`
  Preview.
  Models JSR and JSR_W instructions discontinued from the `code` array of a `Code` attribute since class file version 51.0.
  `static interface`
  `DiscontinuedInstruction.RetInstructionPREVIEW`
  Preview.
  Models RET and RET_W instructions discontinued from the `code` array of a `Code` attribute since class file version 51.0.

- ## Method Summary

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

  `opcode, sizeInBytes`