モジュール java.base
クラスCustomAttribute<T extends CustomAttributePREVIEW<T>>
java.lang.Object
java.lang.classfile.CustomAttribute<T>
- 型パラメータ:
T
- カスタム属性タイプ
- すべての実装されたインタフェース:
AttributePREVIEW<T>
,ClassElementPREVIEW
,ClassFileElementPREVIEW
,CodeElementPREVIEW
,FieldElementPREVIEW
,MethodElementPREVIEW
,WritableElementPREVIEW<T>
public abstract non-sealed class CustomAttribute<T extends CustomAttributePREVIEW<T>> extends Object implements AttributePREVIEW<T>, CodeElementPREVIEW, ClassElementPREVIEW, MethodElementPREVIEW, FieldElementPREVIEW
CustomAttribute
は、JavaプラットフォームのプレビューAPIです。
プレビュー機能は、今後のリリースで削除するか、Javaプラットフォームの永続機能にアップグレードすることができます。
クラス・ファイルの非標準属性をモデル化します。 クライアントは、このクラスを拡張して非標準属性に実装クラスを提供し、クラス・ファイル形式とCustomAttributePREVIEW表現を仲介する
AttributeMapper
PREVIEWを提供する必要があります。 - 導入されたバージョン:
- 22
-
コンストラクタのサマリー
修飾子コンストラクタ説明protected
CustomAttribute
(AttributeMapperPREVIEW<T> mapper) CustomAttributePREVIEWを作成します。 -
メソッドのサマリー
修飾子と型メソッド説明final AttributeMapperPREVIEW
<T> この属性に関連付けられているAttributeMapper
PREVIEWを返します。final String
属性の名前を返します。final void
指定されたライターに要素を書き込みます
-
コンストラクタの詳細
-
CustomAttribute
protected CustomAttribute(AttributeMapperPREVIEW<T> mapper) CustomAttributePREVIEWを作成します。- パラメータ:
mapper
- 属性マッパー
-
-
メソッドの詳細
-
attributeMapper
public final AttributeMapperPREVIEW<T> attributeMapper()インタフェースからコピーされた説明:Attribute
この属性に関連付けられているAttributeMapper
PREVIEWを返します。- 定義:
- インタフェース
AttributePREVIEW<T extends CustomAttributePREVIEW<T>>
内のattributeMapper
- 戻り値:
- この属性に関連付けられている
AttributeMapper
PREVIEW
-
attributeName
public final String attributeName()インタフェースからコピーされた説明:Attribute
属性の名前を返します。- 定義:
- インタフェース
AttributePREVIEW<T extends CustomAttributePREVIEW<T>>
内のattributeName
- 戻り値:
- 属性の名前
-
writeTo
インタフェース:WritableElement
からコピーされた説明指定されたライターに要素を書き込みます- 定義:
- インタフェース
WritableElementPREVIEW<T extends CustomAttributePREVIEW<T>>
内のwriteTo
- パラメータ:
buf
- ライター
-
CustomAttribute
を使用できます。