org.seasar.jface.util
クラス AnnotationUtil

java.lang.Object
  上位を拡張 org.seasar.jface.util.AnnotationUtil

public class AnnotationUtil
extends Object

アノテーションを持つクラスに対するユーティリティクラスです。

作成者:
y-komori

コンストラクタの概要
AnnotationUtil()
           
 
メソッドの概要
static List<Field> getAnnotatedFields(Class<?> clazz, Class<? extends Annotation> annotationClass)
          特定のアノテーションが付加されたフィールドを取得します。
static List<org.seasar.framework.beans.PropertyDesc> getAnnotatedPropertyDescs(Class<?> clazz, Class<? extends Annotation> annotationClass)
          特定のアノテーションが付加されたフィールドに対応する PropertyDesc を取得します。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

AnnotationUtil

public AnnotationUtil()
メソッドの詳細

getAnnotatedFields

public static List<Field> getAnnotatedFields(Class<?> clazz,
                                             Class<? extends Annotation> annotationClass)
特定のアノテーションが付加されたフィールドを取得します。

class で指定されたクラスから annotationClass で指定されたアノテーションが付加されたフィールドオブジェクトのリストを返します。
フィールドは、親クラスまでさかのぼってすべて検索されます。

パラメータ:
clazz - 対象クラス
annotationClass - 対象アノテーション
戻り値:
見つかったフィールドのリスト

getAnnotatedPropertyDescs

public static List<org.seasar.framework.beans.PropertyDesc> getAnnotatedPropertyDescs(Class<?> clazz,
                                                                                      Class<? extends Annotation> annotationClass)
特定のアノテーションが付加されたフィールドに対応する PropertyDesc を取得します。

class で指定されたクラスから annotationClass で指定されたアノテーションが付加されたフィールドオブジェクトを検索し、それに対応する PropertyDesc オブジェクトのリストを返します。 フィールドは、親クラスまでさかのぼってすべて検索されます。

パラメータ:
clazz - 対象クラス
annotationClass - 対象アノテーション
戻り値:
見つかった PropertyDesc のリスト


Copyright © 2006 The Seasar Foundation. All Rights Reserved.