インタフェース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 sがあることを示します。 CompoundElementは、メンバーがClassElement、MethodElement、FieldElementまたはCodeElementでマークされているメンバー構造の構成として、構造を表示できることを示します。
メンバーシップ要素
ClassModel、MethodModel、FieldModelおよびCodeModelにはそれぞれ、メンバー構造を示す専用インタフェースがあります: ClassElement、MethodElement、FieldElementおよびCodeElement。 ClassBuilder、MethodBuilder、FieldBuilderまたはCodeBuilderに指定して、ビルド・モデルのメンバーとして含めることができます。 特に指定がないかぎり、これらの構造は、対応するモデルのtraversal中に提供されます。 これらの要素の中には、モデルのトラバーサルで最大1回または正確に1回出現するものがあります。このような要素は、ClassFileBuilderによって特別な処理を受け、モデリング・インタフェースで指定されます。 このような要素がトラバース中に複数回出現する場合は、最後に出現したものが使用され、以前のすべてのインスタンスが破棄されます。
これらのメンバーシップ要素マーカー・インタフェースはシールされます。Java SEプラットフォームの将来のバージョンでは、Javaプラットフォームのclassファイル形式が展開されるときに、シール済階層への新しい要素が定義される場合があります。 これらの階層を網羅したパターン・マッチング・スイッチを使用すると、ユーザーは処理コードを特定のバージョンのJavaプラットフォーム上で実行するだけで済むことを示し、不明な新しい要素が検出されると失敗します。