クラスCustomAttribute<T extends CustomAttribute<T>>

java.lang.Object
java.lang.classfile.CustomAttribute<T>
型パラメータ:
T - カスタム属性タイプ
すべての実装されたインタフェース:
Attribute<T>, ClassElement, ClassFileElement, CodeElement, FieldElement, MethodElement

public abstract non-sealed class CustomAttribute<T extends CustomAttribute<T>> extends Object implements Attribute<T>, CodeElement, ClassElement, MethodElement, FieldElement
classファイル内のユーザー定義属性をモデル化します。 ユーザー定義属性のAPIモデルでは、このクラスを拡張する必要があります。 ユーザー定義属性には、attributeMapper()によって返され、ユーザー定義属性を読み取ることができるようにClassFile.AttributeMapperOptionに登録されるAttributeMapperも定義する必要があります。

現在、ユーザー定義属性は、CodeModelのトラバーサルでは配信されません。

classファイルから読み取られたユーザー定義属性のアクセッサ・メソッドでは、属性モデルが遅延評価され、評価で属性の不正なclassファイル形式が検出されると、IllegalArgumentExceptionがスローされる場合があります。

導入されたバージョン:
24
関連項目: