インタフェースAttribute<A extends Attribute<A>>
- 型パラメータ:
A- 属性の型
- すべてのスーパー・インタフェース:
ClassFileElement
- 既知のすべてのサブインタフェース:
AnnotationDefaultAttribute,BootstrapMethodsAttribute,CharacterRangeTableAttribute,CodeAttribute,CompilationIDAttribute,ConstantValueAttribute,DeprecatedAttribute,EnclosingMethodAttribute,ExceptionsAttribute,InnerClassesAttribute,LineNumberTableAttribute,LocalVariableTableAttribute,LocalVariableTypeTableAttribute,MethodParametersAttribute,ModuleAttribute,ModuleHashesAttribute,ModuleMainClassAttribute,ModulePackagesAttribute,ModuleResolutionAttribute,ModuleTargetAttribute,NestHostAttribute,NestMembersAttribute,PermittedSubclassesAttribute,RecordAttribute,RuntimeInvisibleAnnotationsAttribute,RuntimeInvisibleParameterAnnotationsAttribute,RuntimeInvisibleTypeAnnotationsAttribute,RuntimeVisibleAnnotationsAttribute,RuntimeVisibleParameterAnnotationsAttribute,RuntimeVisibleTypeAnnotationsAttribute,SignatureAttribute,SourceDebugExtensionAttribute,SourceFileAttribute,SourceIDAttribute,StackMapTableAttribute,SyntheticAttribute,UnknownAttribute
- 既知のすべての実装クラス:
CustomAttribute
public sealed interface Attribute<A extends Attribute<A>> extends ClassFileElement permits AnnotationDefaultAttribute, BootstrapMethodsAttribute, CharacterRangeTableAttribute, CodeAttribute, CompilationIDAttribute, ConstantValueAttribute, DeprecatedAttribute, EnclosingMethodAttribute, ExceptionsAttribute, InnerClassesAttribute, LineNumberTableAttribute, LocalVariableTableAttribute, LocalVariableTypeTableAttribute, MethodParametersAttribute, ModuleAttribute, ModuleHashesAttribute, ModuleMainClassAttribute, ModulePackagesAttribute, ModuleResolutionAttribute, ModuleTargetAttribute, NestHostAttribute, NestMembersAttribute, PermittedSubclassesAttribute, RecordAttribute, RuntimeInvisibleAnnotationsAttribute, RuntimeInvisibleParameterAnnotationsAttribute, RuntimeInvisibleTypeAnnotationsAttribute, RuntimeVisibleAnnotationsAttribute, RuntimeVisibleParameterAnnotationsAttribute, RuntimeVisibleTypeAnnotationsAttribute, SignatureAttribute, SourceDebugExtensionAttribute, SourceFileAttribute, SourceIDAttribute, StackMapTableAttribute, SyntheticAttribute, UnknownAttribute, CustomAttribute<T> (not exhaustive)
classファイル形式で属性(JVMS 4.7)をモデル化します。 属性は、属性への基本的な読取りアクセスを提供するAttributedElementでモデル化された特定のclassファイル構造体に存在します。
このシール済インタフェース階層には、JVMSおよびJDK固有の非標準属性に事前定義された属性が含まれます。 それらの「マッパー」は、Attributesにあります。 Attributeの2つの特別なサブタイプは、すべてのユーザー定義属性が拡張されるCustomAttribute、およびclassファイルから読み取られるがClassFile.AttributeMapperOptionでは認識されない属性を表すUnknownAttributeです。
属性は、AttributedElementまたはCompoundElementの要素トラバースを介して読み取られ、ClassFileBuilderを介して書き込まれます。 詳細は、「属性の読取り」および「属性の記述」を参照してください。
- Java Virtual Machine仕様を参照してください:
-
4.7 属性
- シール済クラス階層グラフ:
- 導入されたバージョン:
- 24
- 関連項目:
-
メソッドのサマリー
-
メソッドの詳細
-
attributeName
Utf8Entry attributeName()属性の名前を返します。 名前の「文字列値」は、attributeMapper().name()の値と同等です。この属性が
classファイルから読み取られると、このメソッドはclassファイル内の属性名を示すUtf8Entryを返します。- 戻り値:
- 属性の名前
-
attributeMapper
AttributeMapper<A> attributeMapper()この属性に関連付けられたAttributeMapperを返します。- 戻り値:
- この属性に関連付けられた
AttributeMapper
-