public class ReflectUtils extends Object
Constructor and Description |
---|
ReflectUtils() |
Modifier and Type | Method and Description |
---|---|
static Map |
convertObjectToMap(Object srcObj,
ForestConfiguration configuration) |
static void |
copyAnnotationAttributes(Annotation source,
Object target) |
static Map<String,Object> |
getAttributesFromAnnotation(Annotation ann)
从注解对象中获取所有属性
|
static Class |
getClassByType(Type genericType)
从Type获取Class
|
static boolean |
isPrimaryArrayType(Class type)
是否为基本数组类型
|
static boolean |
isPrimaryType(Class type)
是否是Java基本类型
|
public static boolean isPrimaryType(Class type)
type
- Java类,Class
类实例true
:是基本类型,false
:不是基本类型public static boolean isPrimaryArrayType(Class type)
type
- Java类,Class
类实例true
:是基本数组类型,false
:不是基本数组类型public static Map<String,Object> getAttributesFromAnnotation(Annotation ann)
ann
- 注解对象,Annotation
接口实例Map
表对象,Key:属性名 Value:属性值public static void copyAnnotationAttributes(Annotation source, Object target)
public static Map convertObjectToMap(Object srcObj, ForestConfiguration configuration)
Copyright © 2020. All rights reserved.