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

# Interface CodeElement

All Superinterfaces:
  `ClassFileElement`

All Known Subinterfaces:
  `ArrayLoadInstruction, ArrayStoreInstruction, BranchInstruction, CharacterRange, ConstantInstruction, ConstantInstruction.ArgumentConstantInstruction, ConstantInstruction.IntrinsicConstantInstruction, ConstantInstruction.LoadConstantInstruction, ConvertInstruction, DiscontinuedInstruction, DiscontinuedInstruction.JsrInstruction, DiscontinuedInstruction.RetInstruction, ExceptionCatch, FieldInstruction, IncrementInstruction, Instruction, InvokeDynamicInstruction, InvokeInstruction, LabelTarget, LineNumber, LoadInstruction, LocalVariable, LocalVariableType, LookupSwitchInstruction, MonitorInstruction, NewMultiArrayInstruction, NewObjectInstruction, NewPrimitiveArrayInstruction, NewReferenceArrayInstruction, NopInstruction, OperatorInstruction, PseudoInstruction, ReturnInstruction, RuntimeInvisibleTypeAnnotationsAttribute, RuntimeVisibleTypeAnnotationsAttribute, StackInstruction, StackMapTableAttribute, StoreInstruction, TableSwitchInstruction, ThrowInstruction, TypeCheckInstruction, UnknownAttribute`

All Known Implementing Classes:
  `CustomAttribute`

public sealed interface CodeElement extends ClassFileElement permits Instruction, PseudoInstruction, CustomAttribute<T>, RuntimeVisibleTypeAnnotationsAttribute, RuntimeInvisibleTypeAnnotationsAttribute, StackMapTableAttribute, UnknownAttribute
Marker interface for a member element of a `CodeModel`. Such an element can appear when traversing a `CodeModel` unless otherwise specified, be supplied to a `CodeBuilder`, and be processed by a `CodeTransform`.

Code elements can be categorized into `Instruction`, `PseudoInstruction`, and `Attribute`. Unlike in other `CompoundElement`, the order of elements for all `Instruction`s and some `PseudoInstruction`s is significant.

Sealed Class Hierarchy Graph:
Since:
  24
See Also:
  - Membership Elements
  - `ClassElement`
  - `MethodElement`
  - `FieldElement`