| Package | Description |
|---|---|
| org.aoju.bus.core.beans |
Bean相关操作,包括Bean信息描述,Bean路径表达式、动态Bean等
|
| org.aoju.bus.core.toolkit |
工具包,提供各种工具方法,按照归类入口为XXXKit,如数组工具ArrayKit等
|
| Modifier and Type | Method and Description |
|---|---|
PropertyDesc |
BeanDesc.getProp(String fieldName)
获取属性,如果不存在返回null
|
PropertyDesc |
PropertyDesc.setValue(Object bean,
Object value)
设置Bean的字段值
首先调用字段对应的Setter方法,如果Setter方法不存在,则判断字段如果为public,则直接赋值字段值
此方法不检查任何注解,使用前需调用
isWritable(boolean) 检查是否可写 |
PropertyDesc |
PropertyDesc.setValue(Object bean,
Object value,
boolean ignoreNull,
boolean ignoreError)
设置属性值,可以自动转换字段类型为目标类型
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,PropertyDesc> |
BeanDesc.getPropMap(boolean ignoreCase)
获取字段名-字段属性Map
|
Collection<PropertyDesc> |
BeanDesc.getProps()
获取字段属性列表
|
| Modifier and Type | Method and Description |
|---|---|
static void |
BeanKit.forEach(Class<?> clazz,
Consumer<? super PropertyDesc> action)
遍历Bean的属性
|
Copyright © 2021. All rights reserved.