org.seasar.framework.util
クラス MethodUtil

java.lang.Object
  拡張org.seasar.framework.util.MethodUtil

public final class MethodUtil
extends Object

Method用のユーティリティクラスです。

作成者:
higa

フィールドの概要
protected static Method GET_ELEMENT_TYPE_FROM_PARAMETER_METHOD
          getElementTypeOfListFromParameterMethod()への定数参照です
protected static Method GET_ELEMENT_TYPE_FROM_RETURN_METHOD
          getElementTypeOfListFromReturnMethod()への定数参照です。
protected static String REFLECTION_UTIL_CLASS_NAME
          ReflectUtilのクラス名です。
 
メソッドの概要
protected static Method getElementTypeOfListFromParameterMethod()
          getElementTypeOfListFromParameterの Methodを返します。
static Class getElementTypeOfListFromParameterType(Method method, int position)
          Java5以上の場合は、引数のGenericsなListの要素を返します。
protected static Method getElementTypeOfListFromReturnMethod()
          getElementTypeOfListFromReturnの Methodを返します。
static Class getElementTypeOfListFromReturnType(Method method)
          Java5以上の場合は、戻り値のGenericsなListの要素を返します。
static String getSignature(String methodName, Class[] argTypes)
          シグニチャを返します。
static String getSignature(String methodName, Object[] methodArgs)
          シグニチャを返します。
static Object invoke(Method method, Object target, Object[] args)
          Method.invoke(Object, Object[])の例外処理をラップします。
static boolean isAbstract(Method method)
          abstractかどうかを返します。
static boolean isBridgeMethod(Method method)
          ブリッジメソッドかどうか返します。
static boolean isEqualsMethod(Method method)
          equalsメソッドかどうかを返します。
static boolean isHashCodeMethod(Method method)
          hashCodeメソッドかどうか返します。
static boolean isSyntheticMethod(Method method)
          合成メソッドかどうかを返します。
static boolean isToStringMethod(Method method)
          toStringメソッドかどうか返します。
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

REFLECTION_UTIL_CLASS_NAME

protected static final String REFLECTION_UTIL_CLASS_NAME
ReflectUtilのクラス名です。

関連項目:
定数フィールド値

GET_ELEMENT_TYPE_FROM_PARAMETER_METHOD

protected static final Method GET_ELEMENT_TYPE_FROM_PARAMETER_METHOD
getElementTypeOfListFromParameterMethod()への定数参照です


GET_ELEMENT_TYPE_FROM_RETURN_METHOD

protected static final Method GET_ELEMENT_TYPE_FROM_RETURN_METHOD
getElementTypeOfListFromReturnMethod()への定数参照です。

メソッドの詳細

invoke

public static Object invoke(Method method,
                            Object target,
                            Object[] args)
                     throws InvocationTargetRuntimeException,
                            IllegalAccessRuntimeException
Method.invoke(Object, Object[])の例外処理をラップします。

パラメータ:
method -
target -
args -
戻り値:
戻り値
例外:
InvocationTargetRuntimeException - InvocationTargetExceptionが発生した場合
IllegalAccessRuntimeException - IllegalAccessExceptionが発生した場合
関連項目:
Method.invoke(Object, Object[])

isAbstract

public static boolean isAbstract(Method method)
abstractかどうかを返します。

パラメータ:
method -
戻り値:
abstractかどうか

getSignature

public static String getSignature(String methodName,
                                  Class[] argTypes)
シグニチャを返します。

パラメータ:
methodName -
argTypes -
戻り値:
シグニチャ

getSignature

public static String getSignature(String methodName,
                                  Object[] methodArgs)
シグニチャを返します。

パラメータ:
methodName -
methodArgs -
戻り値:
シグニチャ

isEqualsMethod

public static boolean isEqualsMethod(Method method)
equalsメソッドかどうかを返します。

パラメータ:
method -
戻り値:
equalsメソッドかどうか

isHashCodeMethod

public static boolean isHashCodeMethod(Method method)
hashCodeメソッドかどうか返します。

パラメータ:
method -
戻り値:
hashCodeメソッドかどうか

isToStringMethod

public static boolean isToStringMethod(Method method)
toStringメソッドかどうか返します。

パラメータ:
method -
戻り値:
toStringメソッドかどうか

isBridgeMethod

public static boolean isBridgeMethod(Method method)
ブリッジメソッドかどうか返します。

パラメータ:
method -
戻り値:
ブリッジメソッドかどうか

isSyntheticMethod

public static boolean isSyntheticMethod(Method method)
合成メソッドかどうかを返します。

パラメータ:
method -
戻り値:
合成メソッドかどうか

getElementTypeOfListFromParameterType

public static Class getElementTypeOfListFromParameterType(Method method,
                                                          int position)
Java5以上の場合は、引数のGenericsなListの要素を返します。

パラメータ:
method -
position -
戻り値:
GenericsなListの要素

getElementTypeOfListFromReturnType

public static Class getElementTypeOfListFromReturnType(Method method)
Java5以上の場合は、戻り値のGenericsなListの要素を返します。

パラメータ:
method -
戻り値:
GenericsなListの要素

getElementTypeOfListFromParameterMethod

protected static Method getElementTypeOfListFromParameterMethod()
getElementTypeOfListFromParameterの Methodを返します。

戻り値:
Method

getElementTypeOfListFromReturnMethod

protected static Method getElementTypeOfListFromReturnMethod()
getElementTypeOfListFromReturnの Methodを返します。

戻り値:
Method


Copyright © 2004-2007 The Seasar Foundation. All Rights Reserved.