Package | Description |
---|---|
org.dromara.hutool.core.bean |
Bean相关操作,包括Bean信息描述,Bean路径表达式、动态Bean、Bean工具等
|
org.dromara.hutool.core.bean.copier |
Bean拷贝实现,包括拷贝选项等
|
org.dromara.hutool.core.bean.path |
Bean路径,通过路径表达式查找或设置对象或子对象中的值
|
Modifier and Type | Method and Description |
---|---|
default PropDesc |
BeanDesc.getProp(String fieldName)
获取属性,如果不存在返回null
|
PropDesc |
PropDesc.setValue(Object bean,
Object value)
设置Bean的字段值
首先调用字段对应的Setter方法,如果Setter方法不存在,则判断字段如果为public,则直接赋值字段值 此方法不检查任何注解,使用前需调用 isWritable(boolean) 检查是否可写 |
PropDesc |
PropDesc.setValue(Object bean,
Object value,
boolean ignoreNull,
boolean ignoreError)
设置属性值,可以自动转换字段类型为目标类型
|
PropDesc |
PropDesc.setValue(Object bean,
Object value,
boolean ignoreNull,
boolean ignoreError,
boolean override)
设置属性值,可以自动转换字段类型为目标类型
|
Modifier and Type | Method and Description |
---|---|
Map<String,PropDesc> |
BeanDesc.getPropMap(boolean ignoreCase)
获取字段名-字段属性Map
|
default Collection<PropDesc> |
BeanDesc.getProps()
获取字段属性列表
|
Modifier and Type | Method and Description |
---|---|
static void |
BeanUtil.descForEach(Class<?> clazz,
Consumer<? super PropDesc> action)
遍历Bean的属性
|
Modifier and Type | Method and Description |
---|---|
protected PropDesc |
CopyOptions.findPropDesc(Map<String,PropDesc> targetPropDescMap,
String sKeyStr)
查找Map对应Bean的名称
尝试原名称、转驼峰名称、isXxx去掉is的名称 |
Modifier and Type | Method and Description |
---|---|
protected PropDesc |
CopyOptions.findPropDesc(Map<String,PropDesc> targetPropDescMap,
String sKeyStr)
查找Map对应Bean的名称
尝试原名称、转驼峰名称、isXxx去掉is的名称 |
Modifier and Type | Field and Description |
---|---|
protected Map<String,PropDesc> |
AbstractBeanDesc.propMap
属性Map
|
Modifier and Type | Method and Description |
---|---|
Map<String,PropDesc> |
AbstractBeanDesc.getPropMap(boolean ignoreCase) |
Copyright © 2025. All rights reserved.