src/org/nutz/lang/reflect/ReflectTool.java
public static Class<?> getParameterRealGenericClass(Class<?> clazz, Type type, int index) {
        if (type instanceof ParameterizedType) {
            Type[] actualTypeArguments = ((ParameterizedType) type).getActualTypeArguments();
            return getRealGenericClass(clazz, actualTypeArguments[index]);
        }
        return Object.class;
    }
public static Class<?> getParameterRealGenericClass(Class<?> clazz, Type type, int index) {
        if (type instanceof ParameterizedType) {
            Type[] actualTypeArguments = ((ParameterizedType) type).getActualTypeArguments();
            return getRealGenericClass(clazz, actualTypeArguments[index]);
        }
        return Object.class;
    }
public static Class < ? > getParameterRealGenericClass ( Class < ? > clazz , Type type , int index ) { if ( type instanceof ParameterizedType ) { Type [ ] actualTypeArguments = ( ( ParameterizedType ) type ) . getActualTypeArguments ( ) ; return getRealGenericClass ( clazz , actualTypeArguments [ index ] ) ; } return Object . class ; }
获取泛型类参数的实际类型.例如 Map<String, E>，获取E实际的类型.
@param clazz 泛型基类.
@param type 泛型基类中的某个type
@return
获取泛型类参数的实际类型 . 例如 Map<String E > ，获取E实际的类型 .