public class Tools extends Object
| 构造器和说明 |
|---|
Tools() |
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
arrayISNULL(Object[] objs) |
static String |
arraytostring(String[] strs) |
static boolean |
checkNested(List list) |
static boolean |
checkNested(Object obj) |
static String |
getESId(Object obj)
根据对象中的注解获取ID的字段值
|
static Map |
getFieldValue(Object o)
获取o中所有的字段有值的map组合
|
static Class |
getSuperClassGenricType(Class clazz)
通过反射,获得定义Class时声明的父类的范型参数的类型.
|
static Class |
getSuperClassGenricType(Class clazz,
int index)
通过反射,获得定义Class时声明的父类的范型参数的类型.
|
static <T> List<List<T>> |
splitList(List<T> oriList,
boolean isParallel) |
public static String getESId(Object obj) throws Exception
obj - Exceptionpublic static Map getFieldValue(Object o) throws IllegalAccessException
IllegalAccessExceptionpublic static Class getSuperClassGenricType(Class clazz)
clazz - The class to introspectObject.class if cannot be determinedpublic static Class getSuperClassGenricType(Class clazz, int index) throws IndexOutOfBoundsException
clazz - clazz The class to introspectindex - the Index of the generic ddeclaration,start from 0.IndexOutOfBoundsExceptionpublic static boolean arrayISNULL(Object[] objs)
public static boolean checkNested(List list)
public static boolean checkNested(Object obj)
Copyright © 2020. All rights reserved.