public class BeanUtil extends Object
Constructor and Description |
---|
BeanUtil() |
Modifier and Type | Method and Description |
---|---|
static PropertyDescriptor |
getPropertyDescriptor(Class<?> clazz,
String fieldName)
获得Bean类属性描述,大小写敏感
|
static PropertyDescriptor |
getPropertyDescriptor(Class<?> clazz,
String fieldName,
boolean ignoreCase)
获得Bean类属性描述
|
static Map<String,PropertyDescriptor> |
getPropertyDescriptorMap(Class<?> clazz,
boolean ignoreCase)
获得字段名和字段描述Map,获得的结果会缓存在
BeanInfoCache 中 |
static PropertyDescriptor[] |
getPropertyDescriptors(Class<?> clazz)
获得Bean字段描述数组
|
public static PropertyDescriptor[] getPropertyDescriptors(Class<?> clazz) throws IntrospectionException
clazz
- Bean类IntrospectionException
- 获取属性异常public static Map<String,PropertyDescriptor> getPropertyDescriptorMap(Class<?> clazz, boolean ignoreCase) throws IntrospectionException
BeanInfoCache
中clazz
- Bean类ignoreCase
- 是否忽略大小写IntrospectionException
- 获取属性异常public static PropertyDescriptor getPropertyDescriptor(Class<?> clazz, String fieldName) throws IntrospectionException
clazz
- Bean类fieldName
- 字段名IntrospectionException
- 获取属性异常public static PropertyDescriptor getPropertyDescriptor(Class<?> clazz, String fieldName, boolean ignoreCase) throws IntrospectionException
clazz
- Bean类fieldName
- 字段名ignoreCase
- 是否忽略大小写IntrospectionException
- 获取属性异常Copyright © 2021. All rights reserved.