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

# Package java.lang.classfile.instruction

package java.lang.classfile.instruction
`java.lang.classfile.instruction` is a preview API of the Java platform.
Programs can only use `java.lang.classfile.instruction` when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.

## Provides interfaces describing code instructions for the `java.lang.classfile`PREVIEW library.

The `java.lang.classfile.attribute` package contains interfaces describing code instructions.

Since:
  22

- Related Packages
  Package
  Description
  java.lang.classfilePREVIEW
  Preview.
  Provides classfile parsing, generation, and transformation library.
  java.lang.classfile.attributePREVIEW
  Preview.
  Provides interfaces describing classfile attributes for the `java.lang.classfile`PREVIEW library.
  java.lang.classfile.componentsPREVIEW
  Preview.
  Provides specific components, transformations, and tools built on top of the `java.lang.classfile`PREVIEW library.
  java.lang.classfile.constantpoolPREVIEW
  Preview.
  Provides interfaces describing classfile constant pool entries for the `java.lang.classfile`PREVIEW library.
- Interfaces
  Class
  Description
  ArrayLoadInstructionPREVIEW
  Preview.
  Models an array load instruction in the `code` array of a `Code` attribute.
  ArrayStoreInstructionPREVIEW
  Preview.
  Models an array store instruction in the `code` array of a `Code` attribute.
  BranchInstructionPREVIEW
  Preview.
  Models a branching instruction (conditional or unconditional) in the `code` array of a `Code` attribute.
  CharacterRangePREVIEW
  Preview.
  A pseudo-instruction which models a single entry in the `CharacterRangeTableAttribute`PREVIEW.
  ConstantInstructionPREVIEW
  Preview.
  Models a constant-load instruction in the `code` array of a `Code` attribute, including "intrinsic constant" instructions (e.g., `iconst_0`), "argument constant" instructions (e.g., `bipush`), and "load constant" instructions (e.g., `LDC`).
  ConstantInstruction.ArgumentConstantInstructionPREVIEW
  Preview.
  Models an "argument constant" instruction (e.g., `bipush`).
  ConstantInstruction.IntrinsicConstantInstructionPREVIEW
  Preview.
  Models an "intrinsic constant" instruction (e.g., `iconst_0`).
  ConstantInstruction.LoadConstantInstructionPREVIEW
  Preview.
  Models a "load constant" instruction (e.g., `ldc`).
  ConvertInstructionPREVIEW
  Preview.
  Models a primitive conversion instruction in the `code` array of a `Code` attribute, such as `i2l`.
  DiscontinuedInstructionPREVIEW
  Preview.
  Models instruction discontinued from the `code` array of a `Code` attribute.
  DiscontinuedInstruction.JsrInstructionPREVIEW
  Preview.
  Models JSR and JSR_W instructions discontinued from the `code` array of a `Code` attribute since class file version 51.0.
  DiscontinuedInstruction.RetInstructionPREVIEW
  Preview.
  Models RET and RET_W instructions discontinued from the `code` array of a `Code` attribute since class file version 51.0.
  ExceptionCatchPREVIEW
  Preview.
  A pseudo-instruction modeling an entry in the exception table of a code attribute.
  FieldInstructionPREVIEW
  Preview.
  Models a field access instruction in the `code` array of a `Code` attribute.
  IncrementInstructionPREVIEW
  Preview.
  Models a local variable increment instruction in the `code` array of a `Code` attribute.
  InvokeDynamicInstructionPREVIEW
  Preview.
  Models an `invokedynamic` instruction in the `code` array of a `Code` attribute.
  InvokeInstructionPREVIEW
  Preview.
  Models a method invocation instruction in the `code` array of a `Code` attribute, other than `invokedynamic`.
  LabelTargetPREVIEW
  Preview.
  A pseudo-instruction which indicates that the specified label corresponds to the current position in the `Code` attribute.
  LineNumberPREVIEW
  Preview.
  A pseudo-instruction which models a single entry in the `LineNumberTableAttribute`PREVIEW.
  LoadInstructionPREVIEW
  Preview.
  Models a local variable load instruction in the `code` array of a `Code` attribute.
  LocalVariablePREVIEW
  Preview.
  A pseudo-instruction which models a single entry in the `LocalVariableTableAttribute`PREVIEW.
  LocalVariableTypePREVIEW
  Preview.
  A pseudo-instruction which models a single entry in the `LocalVariableTypeTableAttribute`PREVIEW.
  LookupSwitchInstructionPREVIEW
  Preview.
  Models a `lookupswitch` instruction in the `code` array of a `Code` attribute.
  MonitorInstructionPREVIEW
  Preview.
  Models a `monitorenter` or `monitorexit` instruction in the `code` array of a `Code` attribute.
  NewMultiArrayInstructionPREVIEW
  Preview.
  Models a `multianewarray` invocation instruction in the `code` array of a `Code` attribute.
  NewObjectInstructionPREVIEW
  Preview.
  Models a `new` instruction in the `code` array of a `Code` attribute.
  NewPrimitiveArrayInstructionPREVIEW
  Preview.
  Models a `newarray` invocation instruction in the `code` array of a `Code` attribute.
  NewReferenceArrayInstructionPREVIEW
  Preview.
  Models a `anewarray` invocation instruction in the `code` array of a `Code` attribute.
  NopInstructionPREVIEW
  Preview.
  Models a `nop` invocation instruction in the `code` array of a `Code` attribute.
  OperatorInstructionPREVIEW
  Preview.
  Models an arithmetic operator instruction in the `code` array of a `Code` attribute.
  ReturnInstructionPREVIEW
  Preview.
  Models a return-from-method instruction in the `code` array of a `Code` attribute.
  StackInstructionPREVIEW
  Preview.
  Models a stack manipulation instruction in the `code` array of a `Code` attribute.
  StoreInstructionPREVIEW
  Preview.
  Models a local variable store instruction in the `code` array of a `Code` attribute.
  SwitchCasePREVIEW
  Preview.
  Models a single case in a `lookupswitch` or `tableswitch` instruction.
  TableSwitchInstructionPREVIEW
  Preview.
  Models a `tableswitch` instruction in the `code` array of a `Code` attribute.
  ThrowInstructionPREVIEW
  Preview.
  Models an `athrow` instruction in the `code` array of a `Code` attribute.
  TypeCheckInstructionPREVIEW
  Preview.
  Models an `instanceof` or `checkcast` instruction in the `code` array of a `Code` attribute.