|
|||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectorg.seasar.framework.util.FieldUtil
Field
用のユーティリティクラスです。
フィールドの概要 | |
protected static Method |
GET_ELEMENT_TYPE_OF_COLLECTION_FROM_FIELD_TYPE_METHOD
getElementTypeOfCollectionFromFieldType(Field) への定数参照です |
protected static Method |
GET_ELEMENT_TYPE_OF_LIST_FROM_FIELD_TYPE_METHOD
getElementTypeOfListFromFieldType(Field) への定数参照です |
protected static Method |
GET_ELEMENT_TYPE_OF_SET_FROM_FIELD_TYPE_METHOD
getElementTypeOfSetFromFieldType(Field) への定数参照です |
protected static String |
REFLECTION_UTIL_CLASS_NAME
ReflectUtilのクラス名です。 |
コンストラクタの概要 | |
protected |
FieldUtil()
インスタンスを構築します。 |
メソッドの概要 | |
static Object |
get(Field field,
Object target)
Field の値をオブジェクトとして取得します。 |
protected static Method |
getElementTypeFromFieldTypeMethod(String type)
ReflectionUtil#getElementTypeOfXxxFromFieldType() の
Method を返します。 |
static Class |
getElementTypeOfCollectionFromFieldType(Field field)
Java5以上の場合は、指定されたフィールドのパラメタ化されたコレクションの要素型を返します。 |
static Class |
getElementTypeOfListFromFieldType(Field field)
Java5以上の場合は、指定されたフィールドのパラメタ化されたリストの要素型を返します。 |
static Class |
getElementTypeOfSetFromFieldType(Field field)
Java5以上の場合は、指定されたフィールドのパラメタ化されたセットの要素型を返します。 |
static int |
getInt(Field field)
staticな Field の値をintとして取得します。 |
static int |
getInt(Field field,
Object target)
Field の値をintとして取得します。 |
static String |
getString(Field field)
staticな Field の値を String として取得します。 |
static String |
getString(Field field,
Object target)
Field の値を String として取得します。 |
static boolean |
isInstanceField(Field field)
インスタンスフィールドかどうか返します。 |
static boolean |
isPublicField(Field field)
パブリックフィールドかどうか返します。 |
static void |
set(Field field,
Object target,
Object value)
Field に値を設定します。 |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
protected static final String REFLECTION_UTIL_CLASS_NAME
protected static final Method GET_ELEMENT_TYPE_OF_COLLECTION_FROM_FIELD_TYPE_METHOD
getElementTypeOfCollectionFromFieldType(Field)
への定数参照です
protected static final Method GET_ELEMENT_TYPE_OF_LIST_FROM_FIELD_TYPE_METHOD
getElementTypeOfListFromFieldType(Field)
への定数参照です
protected static final Method GET_ELEMENT_TYPE_OF_SET_FROM_FIELD_TYPE_METHOD
getElementTypeOfSetFromFieldType(Field)
への定数参照です
コンストラクタの詳細 |
protected FieldUtil()
メソッドの詳細 |
public static Object get(Field field, Object target) throws IllegalAccessRuntimeException
Field
の値をオブジェクトとして取得します。
field
- target
-
Object
IllegalAccessRuntimeException
- IllegalAccessException
がおきた場合Field.get(Object)
public static int getInt(Field field) throws IllegalAccessRuntimeException
Field
の値をintとして取得します。
field
-
IllegalAccessRuntimeException
- IllegalAccessException
が発生した場合getInt(Field, Object)
public static int getInt(Field field, Object target) throws IllegalAccessRuntimeException
Field
の値をintとして取得します。
field
- target
-
IllegalAccessRuntimeException
- IllegalAccessException
が発生した場合Field.getInt(Object)
public static String getString(Field field) throws IllegalAccessRuntimeException
Field
の値を String
として取得します。
field
-
String
の値
IllegalAccessRuntimeException
- IllegalAccessException
が発生した場合getString(Field, Object)
public static String getString(Field field, Object target) throws IllegalAccessRuntimeException
Field
の値を String
として取得します。
field
- target
-
String
の値
IllegalAccessRuntimeException
- IllegalAccessException
が発生した場合Field.get(Object)
public static void set(Field field, Object target, Object value) throws IllegalAccessRuntimeException
Field
に値を設定します。
field
- target
- value
-
IllegalAccessRuntimeException
- IllegalAccessException
が発生した場合Field.set(Object, Object)
public static boolean isInstanceField(Field field)
field
-
public static boolean isPublicField(Field field)
field
-
public static Class getElementTypeOfCollectionFromFieldType(Field field)
field
- フィールド
public static Class getElementTypeOfListFromFieldType(Field field)
field
- フィールド
public static Class getElementTypeOfSetFromFieldType(Field field)
field
- フィールド
protected static Method getElementTypeFromFieldTypeMethod(String type)
ReflectionUtil#getElementTypeOfXxxFromFieldType()
の
Method
を返します。
type
- 取得するメソッドが対象とする型名
ReflectionUtil#getElementTypeOfXxxFromFieldType()
のMethod
|
|||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |