net.paoding.rose.jade.statement
类 GenericUtils

java.lang.Object
  继承者 net.paoding.rose.jade.statement.GenericUtils

public class GenericUtils
extends Object

实现工具类,检查参数化类型的参数类型。

作者:
han.liao

构造方法摘要
GenericUtils()
           
 
方法摘要
protected static void fillConstantFrom(Class<?> clazz, HashMap<String,Object> map)
           
static Class<?>[] getActualClass(Type genericType)
          从参数, 返回值, 基类的: Generic 类型信息获取传入的实际类信息。
static Map<String,?> getConstantFrom(Class<?> clazz, boolean findAncestor, boolean findInterfaces)
          收集类的所有常量。
static void main(String... args)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

GenericUtils

public GenericUtils()
方法详细信息

getActualClass

public static Class<?>[] getActualClass(Type genericType)
从参数, 返回值, 基类的: Generic 类型信息获取传入的实际类信息。

参数:
genericType - - Generic 类型信息
返回:
实际类信息

getConstantFrom

public static Map<String,?> getConstantFrom(Class<?> clazz,
                                            boolean findAncestor,
                                            boolean findInterfaces)
收集类的所有常量。

参数:
clazz - - 收集目标
findAncestor - - 是否查找父类
findInterfaces - - 是否查找接口
返回:
Map 包含类的所有常量

fillConstantFrom

protected static void fillConstantFrom(Class<?> clazz,
                                       HashMap<String,Object> map)

main

public static void main(String... args)


Copyright © 2012. All Rights Reserved.