インタフェース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
-