Module java.base
Package java.lang.classfile

# Interface ClassFileElement

≠
public abstract sealed interface ClassFileElement
permits java.lang.classfile.Attribute<A>, java.lang.classfile.AttributedElement, java.lang.classfile.ClassElement, java.lang.classfile.CodeElement, java.lang.classfile.CompoundElement<E>, java.lang.classfile.FieldElement, java.lang.classfile.MethodElement
Comparing jdk-master and valhalla-csr-open

All Known Subinterfaces:
  `AccessFlags, AnnotationDefaultAttribute, ArrayLoadInstruction, ArrayStoreInstruction, AttributePREVIEW <A>, AttributedElement, BootstrapMethodsAttribute, BranchInstruction, CharacterRange, CharacterRangeTableAttribute, ClassElementPREVIEW , ClassFileVersion, ClassModel, CodeAttribute, CodeElement, CodeModel, CompilationIDAttribute, CompoundElement<E>, ConstantInstruction, ConstantInstruction.ArgumentConstantInstruction, ConstantInstruction.IntrinsicConstantInstruction, ConstantInstruction.LoadConstantInstruction, ConstantValueAttribute, ConvertInstruction, DeprecatedAttribute, DiscontinuedInstruction, DiscontinuedInstruction.JsrInstruction, DiscontinuedInstruction.RetInstruction, EnclosingMethodAttribute, ExceptionCatch, ExceptionsAttribute, FieldElement, FieldInstruction, FieldModel, IncrementInstruction, InnerClassesAttribute, Instruction, Interfaces, InvokeDynamicInstruction, InvokeInstruction, LabelTarget, LineNumber, LineNumberTableAttribute, LoadableDescriptorsAttributePREVIEW , LoadInstruction, LocalVariable, LocalVariableTableAttribute, LocalVariableType, LocalVariableTypeTableAttribute, LookupSwitchInstruction, MethodElement, MethodModel, MethodParametersAttribute, ModuleAttribute, ModuleHashesAttribute, ModuleMainClassAttribute, ModulePackagesAttribute, ModuleResolutionAttribute, ModuleTargetAttribute, MonitorInstruction, NestHostAttribute, NestMembersAttribute, NewMultiArrayInstruction, NewObjectInstruction, NewPrimitiveArrayInstruction, NewReferenceArrayInstruction, NopInstruction, OperatorInstruction, PermittedSubclassesAttribute, PseudoInstruction, RecordAttribute, RecordComponentInfo, ReturnInstruction, RuntimeInvisibleAnnotationsAttribute, RuntimeInvisibleParameterAnnotationsAttribute, RuntimeInvisibleTypeAnnotationsAttribute, RuntimeVisibleAnnotationsAttribute, RuntimeVisibleParameterAnnotationsAttribute, RuntimeVisibleTypeAnnotationsAttribute, SignatureAttribute, SourceDebugExtensionAttribute, SourceFileAttribute, SourceIDAttribute, StackInstruction, StackMapTableAttribute, StoreInstruction, Superclass, SyntheticAttribute, TableSwitchInstruction, ThrowInstruction, TypeCheckInstruction, UnknownAttribute`

All Known Implementing Classes:
  `CustomAttribute`

public sealed interface ClassFileElement permits AttributedElement, CompoundElement<E>, AttributePREVIEW <A>, ClassElementPREVIEW , CodeElement, FieldElement, MethodElement
Marker interface for structures with special capabilities in the `class` file format. `AttributedElement` indicates a structure has `Attribute` PREVIEW s. `CompoundElement` indicates a structure can be viewed as a composition of member structures, whose memberships are marked by `ClassElement` PREVIEW , `MethodElement` , `FieldElement` , or `CodeElement` .

## Membership Elements

`ClassModel` , `MethodModel` , `FieldModel` , and `CodeModel` each has a dedicated interface marking its member structures: `ClassElement` PREVIEW , `MethodElement` , `FieldElement` , and `CodeElement` . They can be supplied to a `ClassBuilder` , a `MethodBuilder` , a `FieldBuilder` , or a `CodeBuilder` to be included as members of the built model. Unless otherwise specified, these structures are delivered during the traversal of the corresponding models. Some of these elements may appear at most once or exactly once in the traversal of the models; such elements have special treatment by `ClassFileBuilder` and are specified in their modeling interfaces. If such elements appear multiple times during traversal, the last occurrence should be used and all previous instances should be discarded.

These membership element marker interfaces are sealed; future versions of the Java SE Platform may define new elements to the sealed hierarchy when the `class` file format for the Java Platform evolves. Using an exhaustive pattern matching switch over these hierarchies indicates the user only wish the processing code to run on a specific version of Java Platform, and will fail if unknown new elements are encountered.

Sealed Class Hierarchy Graph:
Since:
  24

## Summary

Differences
| Elements | Comments | Descriptions | Total
Added | Changed | Removed | Added | Changed | Removed | Added | Changed | Removed
--- | --- | --- | --- | --- | --- | --- | --- | ---
ClassFileElement |  |  |  |  |  |  | 10 |  |  | 10
Total |  |  |  |  |  |  | 10 |  |  | 10