Spec-Zone.ru › OpenJDK 24

Интерфейс ClassFileElement

Все известные подинтерфейсы:
AccessFlags, AnnotationDefaultAttribute, ArrayLoadInstruction, ArrayStoreInstruction, Attribute<A>, AttributedElement, BootstrapMethodsAttribute, BranchInstruction, CharacterRange, CharacterRangeTableAttribute, ClassElement, 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, 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
Все известные реализующие классы:
CustomAttribute
public sealed interface ClassFileElement permits AttributedElement, CompoundElement<E>, Attribute<A>, ClassElement, CodeElement, FieldElement, MethodElement
Маркерный интерфейс для структур со специальными возможностями в формате файла class. AttributedElement указывает, что структура имеет Attribute. CompoundElement указывает, что структура может быть представлена как композиция структур-членов, члены которых отмечены ClassElement, MethodElement, FieldElement или CodeElement.

Элементы членства

ClassModel, MethodModel, FieldModel и CodeModel каждый имеет выделенный интерфейс, отмечающий его структурные элементы-члены: ClassElement, MethodElement, FieldElement и CodeElement. Они могут быть предоставлены ClassBuilder, MethodBuilder, FieldBuilder или CodeBuilder для включения в состав созданной модели. Если не указано иное, эти структуры предоставляются во время обработки соответствующих моделей. Некоторые из этих элементов могут появляться не более одного раза или ровно один раз при прохождении по моделям; такие элементы имеют специальную обработку ClassFileBuilder, и определены в их интерфейсах моделирования. Если такие элементы появляются несколько раз во время обработки, следует использовать последнее появление, а все предыдущие экземпляры следует отбросить.

Эти маркерные интерфейсы элементов членства являются пломбированными; будущие версии Java SE Platform могут определить новые элементы в пломбированной иерархии, когда формат файла class для Java Platform будет развиваться. Использование исчерпывающего шаблона сопоставления с этими иерархиями указывает, что код обработки предназначен только для работы со специфической версией Java Platform, и он потерпит неудачу, если будут встречены неизвестные новые элементы.

Граф иерархии пломбированных классов:
Sealed class hierarchy graph for ClassFileElementSealed class hierarchy graph for ClassFileElement
С:
24

© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://download.java.net/java/early_access/jdk24/docs/api/java.base/java/lang/classfile/ClassFileElement.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API