net.paoding.rose.jade.statement
类 GenericUtils
java.lang.Object
net.paoding.rose.jade.statement.GenericUtils
public class GenericUtils
- extends Object
实现工具类,检查参数化类型的参数类型。
- 作者:
- han.liao
| 从类 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.