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

Module java.base
Package java.lang.classfilePREVIEW

# Interface ClassElement

All Superinterfaces:
  `ClassFileElementPREVIEW`

All Known Subinterfaces:
  `AccessFlagsPREVIEW`, `ClassFileVersionPREVIEW`, `CompilationIDAttributePREVIEW`, `DeprecatedAttributePREVIEW`, `EnclosingMethodAttributePREVIEW`, `FieldModelPREVIEW`, `InnerClassesAttributePREVIEW`, `InterfacesPREVIEW`, `MethodModelPREVIEW`, `ModuleAttributePREVIEW`, `ModuleHashesAttributePREVIEW`, `ModuleMainClassAttributePREVIEW`, `ModulePackagesAttributePREVIEW`, `ModuleResolutionAttributePREVIEW`, `ModuleTargetAttributePREVIEW`, `NestHostAttributePREVIEW`, `NestMembersAttributePREVIEW`, `PermittedSubclassesAttributePREVIEW`, `RecordAttributePREVIEW`, `RuntimeInvisibleAnnotationsAttributePREVIEW`, `RuntimeInvisibleTypeAnnotationsAttributePREVIEW`, `RuntimeVisibleAnnotationsAttributePREVIEW`, `RuntimeVisibleTypeAnnotationsAttributePREVIEW`, `SignatureAttributePREVIEW`, `SourceDebugExtensionAttributePREVIEW`, `SourceFileAttributePREVIEW`, `SourceIDAttributePREVIEW`, `SuperclassPREVIEW`, `SyntheticAttributePREVIEW`, `UnknownAttributePREVIEW`

All Known Implementing Classes:
  `CustomAttributePREVIEW`

public sealed interface ClassElement extends ClassFileElementPREVIEW permits AccessFlagsPREVIEW, SuperclassPREVIEW, InterfacesPREVIEW, ClassFileVersionPREVIEW, FieldModelPREVIEW, MethodModelPREVIEW, CustomAttributePREVIEW<T>, CompilationIDAttributePREVIEW, DeprecatedAttributePREVIEW, EnclosingMethodAttributePREVIEW, InnerClassesAttributePREVIEW, ModuleAttributePREVIEW, ModuleHashesAttributePREVIEW, ModuleMainClassAttributePREVIEW, ModulePackagesAttributePREVIEW, ModuleResolutionAttributePREVIEW, ModuleTargetAttributePREVIEW, NestHostAttributePREVIEW, NestMembersAttributePREVIEW, PermittedSubclassesAttributePREVIEW, RecordAttributePREVIEW, RuntimeInvisibleAnnotationsAttributePREVIEW, RuntimeInvisibleTypeAnnotationsAttributePREVIEW, RuntimeVisibleAnnotationsAttributePREVIEW, RuntimeVisibleTypeAnnotationsAttributePREVIEW, SignatureAttributePREVIEW, SourceDebugExtensionAttributePREVIEW, SourceFileAttributePREVIEW, SourceIDAttributePREVIEW, SyntheticAttributePREVIEW, UnknownAttributePREVIEW
`ClassElement` is a preview API of the Java platform.
Programs can only use `ClassElement` 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 `ClassModel`PREVIEW or be presented to a `ClassBuilder`PREVIEW.

Sealed Class Hierarchy Graph:
Since:
  22