インタフェースjava.lang.annotation.Annotation
の使用

Annotationを使用しているパッケージ
パッケージ
説明
beansの開発に関連するクラスが含まれます -- JavaBeansアーキテクチャに基づくコンポーネント。
このパッケージは、データ・ストリーム、直列化、ファイル・システムによるシステム入出力用に提供されています。
Javaプログラミング言語の設計にあたり基本的なクラスを提供します。
Javaプログラミング言語の注釈機能のライブラリ・サポートを提供します。
クラスとオブジェクトに関するリフレクト情報を取得するための、クラスとインタフェースを提供します。
注釈プロセッサを宣言し、注釈プロセッサが注釈処理ツール環境とやり取りできるようにするための機能。
Java言語モデル、宣言のモデルおよびJavaプログラミング言語のタイプとタイプで構成されるパッケージのタイプと階層。
Javaプログラミング言語の要素をモデル化するために使用されるインタフェースです。
Javaプログラミング言語の型をモデル化するために使用されるインタフェースです。
Java Management Extensionsのコア・クラスを提供します。
すべてのプラットフォーム上で可能なかぎり同じように機能する「軽量」(Java共通言語)コンポーネントのセットを提供します。
このパッケージは、イベントを作成してFlight Recorderを制御するクラスを提供します。
  • java.beansでのAnnotationの使用

    Annotationを実装するjava.beans内のクラス
    修飾子と型
    クラス
    説明
    interface 
    自動的に生成されたBeanInfoクラスのプロパティ関連情報を指定するために使用される注釈。
    interface 
    コンストラクタの注釈。構築されたオブジェクトのgetterメソッドにこのコンストラクタのパラメータがどのように対応するかを示します。
    interface 
    自動生成されたBeanInfoクラスのいくつかのクラス関連情報を指定するために使用される注釈。
    interface 
    Introspectorが注釈付きのコード要素に関連付けられたPropertyDescriptorまたはEventSetDescriptorクラスを構築する際に、「transient」と呼ばれる属性が指定のvalueで宣言されるべきであることを示します。
  • java.ioでのAnnotationの使用

    Annotationを実装しているjava.ioのクラス
    修飾子と型
    クラス
    説明
    interface 
    注釈付きのフィールドまたはメソッドが、「Javaオブジェクト直列化仕様」で定義された「直列化メカニズム」の一部であることを示します。
  • java.langでのAnnotationの使用

    Annotationを実装するjava.lang内のクラス
    修飾子と型
    クラス
    説明
    interface 
    @Deprecatedの注釈を付けられたプログラム要素は、プログラマが使用することを薦められていないプログラム要素です。
    interface 
    インタフェース型の宣言を、Java言語仕様に定義されている関数型インタフェースとすることを目的としていることを示すために使われる情報目的の注釈型です。
    interface 
    メソッド宣言がスーパー・タイプのメソッド宣言をオーバーライドすることを示します。
    interface 
    注釈の付いたメソッドやコンストラクタの本体が自身の可変パラメータに対して安全でない可能性のある操作を実行しないことを示す、プログラマ・アサーションです。
    interface 
    注釈を付けた要素(および注釈を付けた要素に含まれるすべてのプログラム要素)で、名前で指定されたコンパイラ警告が抑制されることを示します。
    Annotation型の型パラメータを持つjava.lang内のメソッド
    修飾子と型
    メソッド
    説明
    <A extends Annotation>
    A
    Class.getAnnotation​(Class<A> annotationClass)
    存在する場合は、この要素の指定された型の注釈を返し、そうでない場合はnullを返します。
    <T extends Annotation>
    T
    Module.getAnnotation​(Class<T> annotationClass)
    存在する場合は、この要素の指定された型の注釈を返し、そうでない場合はnullを返します。
    <A extends Annotation>
    A
    Package.getAnnotation​(Class<A> annotationClass)
    存在する場合は、この要素の指定された型の注釈を返し、そうでない場合はnullを返します。
    <A extends Annotation>
    A[]
    Class.getAnnotationsByType​(Class<A> annotationClass)
    この要素に関連付けられている注釈を返します。
    <A extends Annotation>
    A[]
    Package.getAnnotationsByType​(Class<A> annotationClass)
    この要素に関連付けられている注釈を返します。
    <A extends Annotation>
    A
    Class.getDeclaredAnnotation​(Class<A> annotationClass)
    直接存在する場合は、この要素の指定された型の注釈を返し、そうでない場合はnullを返します。
    <A extends Annotation>
    A
    Package.getDeclaredAnnotation​(Class<A> annotationClass)
    直接存在する場合は、この要素の指定された型の注釈を返し、そうでない場合はnullを返します。
    <A extends Annotation>
    A[]
    Class.getDeclaredAnnotationsByType​(Class<A> annotationClass)
    直接存在する間接的に存在する場合は、この要素の指定された型の注釈を返します。
    <A extends Annotation>
    A[]
    Package.getDeclaredAnnotationsByType​(Class<A> annotationClass)
     
    Annotationを返すjava.lang内のメソッド
    修飾子と型
    メソッド
    説明
    この要素に存在する注釈を返します。
    この要素に存在する注釈を返します。
    Package.getAnnotations()
    この要素に存在する注釈を返します。
    <A extends Annotation>
    A[]
    Class.getAnnotationsByType​(Class<A> annotationClass)
    この要素に関連付けられている注釈を返します。
    <A extends Annotation>
    A[]
    Package.getAnnotationsByType​(Class<A> annotationClass)
    この要素に関連付けられている注釈を返します。
    この要素に直接存在する注釈を返します。
    この要素に直接存在する注釈を返します。
    この要素に直接存在する注釈を返します。
    <A extends Annotation>
    A[]
    Class.getDeclaredAnnotationsByType​(Class<A> annotationClass)
    直接存在する間接的に存在する場合は、この要素の指定された型の注釈を返します。
    <A extends Annotation>
    A[]
    Package.getDeclaredAnnotationsByType​(Class<A> annotationClass)
     
    Annotation型の型引数を持つjava.lang内のメソッド・パラメータ
    修飾子と型
    メソッド
    説明
    boolean
    Class.isAnnotationPresent​(Class<? extends Annotation> annotationClass)
    指定された型の注釈がこの要素に存在する場合はtrueを返し、そうでない場合はfalseを返します。
    boolean
    Package.isAnnotationPresent​(Class<? extends Annotation> annotationClass)
    指定された型の注釈がこの要素に存在する場合はtrueを返し、そうでない場合はfalseを返します。
  • java.lang.annotationでのAnnotationの使用

    Annotationを実装するjava.lang.annotation内のクラス
    修飾子と型
    クラス
    説明
    interface 
    注釈@Documentedが注釈インタフェースAの宣言に存在する場合、要素の@A注釈は要素のパブリック・コントラクトの一部とみなされます。
    interface 
    注釈インタフェースが自動的に継承されることを示します。
    interface 
    定数値を定義するフィールドがネイティブ・コードから参照される可能性があることを示します。
    interface 
    注釈インタフェースjava.lang.annotation.Repeatableは、(meta-)注釈を宣言する注釈インタフェースがrepeatableであることを示すために使用されます。
    interface 
    アノテーション付きインタフェースを持つ注釈が保持される期間を示します。
    interface 
    注釈インタフェースが適用可能なコンテキストを示します。
    Annotation型の引数を持つ型を返すjava.lang.annotation内のメソッド
    修飾子と型
    メソッド
    説明
    Class<? extends Annotation>
    Annotation.annotationType()
    この注釈の注釈インタフェースを返します。
    Class<? extends Annotation>
    IncompleteAnnotationException.annotationType()
    欠落している要素を持つ注釈インタフェースのClassオブジェクトを返します。
    Annotation型の型引数を持つjava.lang.annotation内のコンストラクタ・パラメータ
    修飾子
    コンストラクタ
    説明
     
    IncompleteAnnotationException​(Class<? extends Annotation> annotationType, String elementName)
    指定された注釈インタフェースに名前付き要素がないことを示すIncompleteAnnotationExceptionを構築します。
  • java.lang.reflectでのAnnotationの使用

    Annotation型の型パラメータを持つjava.lang.reflect内のメソッド
    修飾子と型
    メソッド
    説明
    <T extends Annotation>
    T
    AccessibleObject.getAnnotation​(Class<T> annotationClass)
    存在する場合は、この要素の指定された型の注釈を返し、そうでない場合はnullを返します。
    <T extends Annotation>
    T
    AnnotatedElement.getAnnotation​(Class<T> annotationClass)
    存在する場合は、この要素の指定された型の注釈を返し、そうでない場合はnullを返します。
    <T extends Annotation>
    T
    AnnotatedType.getAnnotation​(Class<T> annotationClass)
    存在する場合は、この要素の指定された型の注釈を返し、そうでない場合はnullを返します。
    <T extends Annotation>
    T
    Constructor.getAnnotation​(Class<T> annotationClass)
    存在する場合は、この要素の指定された型の注釈を返し、そうでない場合はnullを返します。
    <T extends Annotation>
    T
    Executable.getAnnotation​(Class<T> annotationClass)
    存在する場合は、この要素の指定された型の注釈を返し、そうでない場合はnullを返します。
    <T extends Annotation>
    T
    Field.getAnnotation​(Class<T> annotationClass)
    存在する場合は、この要素の指定された型の注釈を返し、そうでない場合はnullを返します。
    <T extends Annotation>
    T
    Method.getAnnotation​(Class<T> annotationClass)
    存在する場合は、この要素の指定された型の注釈を返し、そうでない場合はnullを返します。
    <T extends Annotation>
    T
    Parameter.getAnnotation​(Class<T> annotationClass)
    存在する場合は、この要素の指定された型の注釈を返し、そうでない場合はnullを返します。
    <T extends Annotation>
    T
    RecordComponent.getAnnotation​(Class<T> annotationClass)
    存在する場合は、この要素の指定された型の注釈を返し、そうでない場合はnullを返します。
    <T extends Annotation>
    T[]
    AccessibleObject.getAnnotationsByType​(Class<T> annotationClass)
    この要素に関連付けられている注釈を返します。
    default <T extends Annotation>
    T[]
    AnnotatedElement.getAnnotationsByType​(Class<T> annotationClass)
    この要素に関連付けられている注釈を返します。
    <T extends Annotation>
    T[]
    Executable.getAnnotationsByType​(Class<T> annotationClass)
    この要素に関連付けられている注釈を返します。
    <T extends Annotation>
    T[]
    Field.getAnnotationsByType​(Class<T> annotationClass)
    この要素に関連付けられている注釈を返します。
    <T extends Annotation>
    T[]
    Parameter.getAnnotationsByType​(Class<T> annotationClass)
    この要素に関連付けられている注釈を返します。
    <T extends Annotation>
    T
    AccessibleObject.getDeclaredAnnotation​(Class<T> annotationClass)
    直接存在する場合は、この要素の指定された型の注釈を返し、そうでない場合はnullを返します。
    default <T extends Annotation>
    T
    AnnotatedElement.getDeclaredAnnotation​(Class<T> annotationClass)
    直接存在する場合は、この要素の指定された型の注釈を返し、そうでない場合はnullを返します。
    <T extends Annotation>
    T
    Parameter.getDeclaredAnnotation​(Class<T> annotationClass)
    直接存在する場合は、この要素の指定された型の注釈を返し、そうでない場合はnullを返します。
    <T extends Annotation>
    T[]
    AccessibleObject.getDeclaredAnnotationsByType​(Class<T> annotationClass)
    直接存在する間接的に存在する場合は、この要素の指定された型の注釈を返します。
    default <T extends Annotation>
    T[]
    AnnotatedElement.getDeclaredAnnotationsByType​(Class<T> annotationClass)
    直接存在する間接的に存在する場合は、この要素の指定された型の注釈を返します。
    <T extends Annotation>
    T[]
    Parameter.getDeclaredAnnotationsByType​(Class<T> annotationClass)
    直接存在する間接的に存在する場合は、この要素の指定された型の注釈を返します。
    Annotationを返すjava.lang.reflect内のメソッド
    修飾子と型
    メソッド
    説明
    AccessibleObject.getAnnotations()
    この要素に存在する注釈を返します。
    AnnotatedElement.getAnnotations()
    この要素に存在する注釈を返します。
    AnnotatedType.getAnnotations()
    この要素に存在する注釈を返します。
    Parameter.getAnnotations()
    この要素に存在する注釈を返します。
    RecordComponent.getAnnotations()
    この要素に存在する注釈を返します。
    <T extends Annotation>
    T[]
    AccessibleObject.getAnnotationsByType​(Class<T> annotationClass)
    この要素に関連付けられている注釈を返します。
    default <T extends Annotation>
    T[]
    AnnotatedElement.getAnnotationsByType​(Class<T> annotationClass)
    この要素に関連付けられている注釈を返します。
    <T extends Annotation>
    T[]
    Executable.getAnnotationsByType​(Class<T> annotationClass)
    この要素に関連付けられている注釈を返します。
    <T extends Annotation>
    T[]
    Field.getAnnotationsByType​(Class<T> annotationClass)
    この要素に関連付けられている注釈を返します。
    <T extends Annotation>
    T[]
    Parameter.getAnnotationsByType​(Class<T> annotationClass)
    この要素に関連付けられている注釈を返します。
    AccessibleObject.getDeclaredAnnotations()
    この要素に直接存在する注釈を返します。
    AnnotatedElement.getDeclaredAnnotations()
    この要素に直接存在する注釈を返します。
    AnnotatedType.getDeclaredAnnotations()
    この要素に直接存在する注釈を返します。
    この要素に直接存在する注釈を返します。
    この要素に直接存在する注釈を返します。
    この要素に直接存在する注釈を返します。
    この要素に直接存在する注釈を返します。
    RecordComponent.getDeclaredAnnotations()
    この要素に直接存在する注釈を返します。
    <T extends Annotation>
    T[]
    AccessibleObject.getDeclaredAnnotationsByType​(Class<T> annotationClass)
    直接存在する間接的に存在する場合は、この要素の指定された型の注釈を返します。
    default <T extends Annotation>
    T[]
    AnnotatedElement.getDeclaredAnnotationsByType​(Class<T> annotationClass)
    直接存在する間接的に存在する場合は、この要素の指定された型の注釈を返します。
    <T extends Annotation>
    T[]
    Parameter.getDeclaredAnnotationsByType​(Class<T> annotationClass)
    直接存在する間接的に存在する場合は、この要素の指定された型の注釈を返します。
    このオブジェクトによって表されるExecutableの仮パラメータの注釈を表すAnnotationの配列の配列を、宣言順に返します。
    abstract Annotation[][]
    このオブジェクトによって表されるExecutableの仮パラメータの注釈を表すAnnotationの配列の配列を、宣言順に返します。
    このオブジェクトによって表されるExecutableの仮パラメータの注釈を表すAnnotationの配列の配列を、宣言順に返します。
    Annotation型の型引数を持つjava.lang.reflect内のメソッド・パラメータ
    修飾子と型
    メソッド
    説明
    boolean
    AccessibleObject.isAnnotationPresent​(Class<? extends Annotation> annotationClass)
    指定された型の注釈がこの要素に存在する場合はtrueを返し、そうでない場合はfalseを返します。
    default boolean
    AnnotatedElement.isAnnotationPresent​(Class<? extends Annotation> annotationClass)
    指定された型の注釈がこの要素に存在する場合はtrueを返し、そうでない場合はfalseを返します。
  • javax.annotation.processingでのAnnotationの使用

    Annotationを実装するjavax.annotation.processing内のクラス
    修飾子と型
    クラス
    説明
    interface 
    Generated注釈は、生成されたソース・コードにマークを付けるために使用されます。
    interface 
    注釈プロセッサがサポートする注釈インタフェースを示すために使用される注釈。
    interface 
    ある注釈プロセッサがサポートするオプションを示すのに使用される注釈。
    interface 
    ある注釈プロセッサがサポートする最新ソース・バージョンを示すのに使用される注釈。
    Annotation型の型引数を持つjavax.annotation.processing内のメソッド・パラメータ
    修飾子と型
    メソッド
    説明
    Set<? extends Element>
    RoundEnvironment.getElementsAnnotatedWith​(Class<? extends Annotation> a)
    指定された注釈型を使って注釈を付けられた要素を返します。
    default Set<? extends Element>
    RoundEnvironment.getElementsAnnotatedWithAny​(Set<Class<? extends Annotation>> annotations)
    指定された注釈型の1つ以上で注釈が付けられた要素を返します。
  • javax.lang.modelでのAnnotationの使用

    Annotation型の型パラメータを持つjavax.lang.model内のメソッド
    修飾子と型
    メソッド
    説明
    <A extends Annotation>
    A
    AnnotatedConstruct.getAnnotation​(Class<A> annotationType)
    存在する場合は、この構造の指定された型の注釈を返し、そうでない場合はnullを返します。
    <A extends Annotation>
    A[]
    AnnotatedConstruct.getAnnotationsByType​(Class<A> annotationType)
    この構造に関連付けられている注釈を返します。
    Annotationを返すjavax.lang.model内のメソッド
    修飾子と型
    メソッド
    説明
    <A extends Annotation>
    A[]
    AnnotatedConstruct.getAnnotationsByType​(Class<A> annotationType)
    この構造に関連付けられている注釈を返します。
  • javax.lang.model.elementでのAnnotationの使用

    Annotation型の型パラメータを持つjavax.lang.model.element内のメソッド
    修飾子と型
    メソッド
    説明
    <A extends Annotation>
    A
    Element.getAnnotation​(Class<A> annotationType)
    存在する場合は、この構造の指定された型の注釈を返し、そうでない場合はnullを返します。
    <A extends Annotation>
    A[]
    Element.getAnnotationsByType​(Class<A> annotationType)
    この構造に関連付けられている注釈を返します。
    Annotationを返すjavax.lang.model.elementのメソッド
    修飾子と型
    メソッド
    説明
    <A extends Annotation>
    A[]
    Element.getAnnotationsByType​(Class<A> annotationType)
    この構造に関連付けられている注釈を返します。
  • javax.lang.model.typeでのAnnotationの使用

    Annotationの型パラメータを持つjavax.lang.model.typeのメソッド
    修飾子と型
    メソッド
    説明
    <A extends Annotation>
    A
    TypeMirror.getAnnotation​(Class<A> annotationType)
    存在する場合は、この構造の指定された型の注釈を返し、そうでない場合はnullを返します。
    <A extends Annotation>
    A[]
    TypeMirror.getAnnotationsByType​(Class<A> annotationType)
    この構造に関連付けられている注釈を返します。
    Annotationを返すjavax.lang.model.typeのメソッド
    修飾子と型
    メソッド
    説明
    <A extends Annotation>
    A[]
    TypeMirror.getAnnotationsByType​(Class<A> annotationType)
    この構造に関連付けられている注釈を返します。
  • javax.managementでのAnnotationの使用

    Annotationを実装するjavax.management内のクラス
    修飾子と型
    クラス
    説明
    interface 
    コンストラクタの注釈。構築されたオブジェクトのgetterメソッドにこのコンストラクタのパラメータがどのように対応するかを示します。
    interface 
    注釈要素とDescriptor内のフィールドとの関係を記述するメタ注釈です。
    interface 
    インタフェースに対して、MXBeanインタフェースである、またはMXBeanインタフェースではないというマークを明示的に付けるための注釈です。
  • javax.swingでのAnnotationの使用

    Annotationを実装しているjavax.swingのクラス
    修飾子と型
    クラス
    説明
    interface 
    自動的に生成されたBeanInfoクラスのswing関連情報を指定するために使用される注釈。
  • jdk.jfrでのAnnotationの使用

    Annotationを実装しているjdk.jfrのクラス
    修飾子と型
    クラス
    説明
    interface 
    イベント・フィールド注釈。値がブール・フラグ、trueまたはfalse値であることを指定します。
    interface 
    イベント・タイプをカテゴリに関連付けるイベント注釈(判読可能なパス形式)。
    interface 
    メタ注釈は、注釈がコンテンツ・タイプ(タイム・スパン、頻度など)を表すことを示します。
    interface 
    イベント・フィールド注釈で、値がデータ(たとえば、バイト)の量を表すことを指定します。
    interface 
    文または2つを使用して要素を記述する注釈。
    interface 
    イベント注釈は、デフォルトでイベントを有効にするかどうかを決定します。
    interface 
    要素が試験的なものであり、予告なしに変更される可能性があることを指定する注釈。
    interface 
    イベント・フィールド注釈で、値がHzで測定される頻度であることを指定します。
    interface 
    要素(たとえば、"Maximum Throughput")に判読可能な名前を設定する注釈。
    interface 
    イベント・フィールド注釈は、値がメモリー・アドレスであることを示します。
    interface 
    新しいタイプのイベント・メタデータを定義するためのメタ注釈。
    interface 
    要素のデフォルト名を設定する注釈。
    interface 
    分数(通常は0.01.0の間)で使用するイベント・フィールド注釈で、値がパーセントであることを指定します。
    interface 
    イベント注釈で、定期イベントのデフォルト設定値を指定します。
    interface 
    プログラムによるイベント登録のためのイベント注釈。
    interface 
    注釈で使用される、リレーショナル注釈のメタ注釈。
    interface 
    イベント・クラスのメソッドをイベントの除外に使用する必要があることを指定する注釈。
    interface 
    イベント注釈。デフォルトでイベントにスタック・トレースがあるかどうかを判別します。
    interface 
    イベント注釈で、イベントが(たとえば、"20 ms")に記録されないデフォルト期間を指定します。
    interface 
    イベント・フィールド注釈は、値が期間であることを指定します。
    interface 
    イベント・フィールド注釈は、値が特定の時点であることを示します。
    interface 
    イベント・フィールド注釈で、イベントがスレッドから遷移することを指定します。
    interface 
    イベント・フィールド注釈では、イベントがスレッドにすぐに遷移することを指定します。
    interface 
    イベント・フィールド注釈は、値が符号なしデータ型であることを示します。
    Annotationの型パラメータを持つjdk.jfrのメソッド
    修飾子と型
    メソッド
    説明
    <A extends Annotation>
    A
    EventType.getAnnotation​(Class<A> annotationClass)
    同じ名前の注釈要素が直接存在する場合は、指定された型の最初の注釈を返します。そうでない場合はnullを返します。
    <A extends Annotation>
    A
    SettingDescriptor.getAnnotation​(Class<A> annotationType)
    同じ名前の注釈要素が使用可能な場合は、指定された型の最初の注釈を返します。それ以外の場合はnullを返します。
    <A extends Annotation>
    A
    ValueDescriptor.getAnnotation​(Class<A> annotationType)
    この値記述子(null)に同じ名前の注釈要素が直接存在する場合は、指定された型の最初の注釈を返します。
    Annotationの型引数を持つjdk.jfrのメソッド・パラメータ
    修飾子と型
    メソッド
    説明
    <A> A
    AnnotationElement.getAnnotation​(Class<? extends Annotation> annotationType)
    同じ名前のAnnotationElementが存在する場合は、指定された型の最初の注釈を戻し、それ以外の場合はnullを戻します。
    Annotationの型引数のjdk.jfrのコンストラクタ・パラメータ
    修飾子
    コンストラクタ
    説明
     
    AnnotationElement​(Class<? extends Annotation> annotationType)
    動的に定義されるイベントに使用する注釈要素を作成します。
     
    AnnotationElement​(Class<? extends Annotation> annotationType, Object value)
    動的に定義されるイベントに使用する注釈要素を作成します。
     
    AnnotationElement​(Class<? extends Annotation> annotationType, Map<String,​Object> values)
    動的に定義されるイベントに使用する注釈要素を作成します。