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

# Interface CodeElement

All Superinterfaces:
  `ClassFileElementPREVIEW`

All Known Subinterfaces:
  `ArrayLoadInstructionPREVIEW`, `ArrayStoreInstructionPREVIEW`, `BranchInstructionPREVIEW`, `CharacterRangePREVIEW`, `ConstantInstructionPREVIEW`, `ConstantInstruction.ArgumentConstantInstructionPREVIEW`, `ConstantInstruction.IntrinsicConstantInstructionPREVIEW`, `ConstantInstruction.LoadConstantInstructionPREVIEW`, `ConvertInstructionPREVIEW`, `DiscontinuedInstructionPREVIEW`, `DiscontinuedInstruction.JsrInstructionPREVIEW`, `DiscontinuedInstruction.RetInstructionPREVIEW`, `ExceptionCatchPREVIEW`, `FieldInstructionPREVIEW`, `IncrementInstructionPREVIEW`, `InstructionPREVIEW`, `InvokeDynamicInstructionPREVIEW`, `InvokeInstructionPREVIEW`, `LabelTargetPREVIEW`, `LineNumberPREVIEW`, `LoadInstructionPREVIEW`, `LocalVariablePREVIEW`, `LocalVariableTypePREVIEW`, `LookupSwitchInstructionPREVIEW`, `MonitorInstructionPREVIEW`, `NewMultiArrayInstructionPREVIEW`, `NewObjectInstructionPREVIEW`, `NewPrimitiveArrayInstructionPREVIEW`, `NewReferenceArrayInstructionPREVIEW`, `NopInstructionPREVIEW`, `OperatorInstructionPREVIEW`, `PseudoInstructionPREVIEW`, `ReturnInstructionPREVIEW`, `RuntimeInvisibleTypeAnnotationsAttributePREVIEW`, `RuntimeVisibleTypeAnnotationsAttributePREVIEW`, `StackInstructionPREVIEW`, `StackMapTableAttributePREVIEW`, `StoreInstructionPREVIEW`, `TableSwitchInstructionPREVIEW`, `ThrowInstructionPREVIEW`, `TypeCheckInstructionPREVIEW`

All Known Implementing Classes:
  `CustomAttributePREVIEW`

public sealed interface CodeElement extends ClassFileElementPREVIEW permits InstructionPREVIEW, PseudoInstructionPREVIEW, CustomAttributePREVIEW<T>, RuntimeVisibleTypeAnnotationsAttributePREVIEW, RuntimeInvisibleTypeAnnotationsAttributePREVIEW, StackMapTableAttributePREVIEW
`CodeElement` is a preview API of the Java platform.
Programs can only use `CodeElement` when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
A marker interface for elements that can appear when traversing a `CodeModel`PREVIEW or be presented to a `CodeBuilder`PREVIEW. Code elements are either an `Instruction`PREVIEW, which models an instruction in the body of a method, or a `PseudoInstruction`PREVIEW, which models metadata from the code attribute, such as line number metadata, local variable metadata, exception metadata, label target metadata, etc.

Since:
  22