| Package | Description |
|---|---|
| org.dromara.hutool.core.bean.path |
Bean路径,通过路径表达式查找或设置对象或子对象中的值
|
| Modifier and Type | Method and Description |
|---|---|
BeanPath<T> |
BeanPath.next() |
static BeanPath<Object> |
BeanPath.of(String expression)
创建Bean路径
|
static <T> BeanPath<T> |
BeanPath.of(String expression,
NodeBeanFactory<T> beanFactory)
创建Bean路径
|
| Modifier and Type | Method and Description |
|---|---|
Object |
DefaultNodeBeanFactory.create(Object parent,
BeanPath<Object> beanPath) |
T |
NodeBeanFactory.create(T parent,
BeanPath<T> beanPath)
创建Bean
beanPath对应当前的路径,即如果父对象为:a,则beanPath为:a.b,则创建的Bean为:a.b.c对应的Bean对象 给定的a一定存在,但是本路径中b对应的Bean不存在,则创建的对象是b的值,这个值用c表示 |
Object |
DefaultNodeBeanFactory.getValue(Object bean,
BeanPath<Object> beanPath) |
Object |
NodeBeanFactory.getValue(T bean,
BeanPath<T> beanPath)
获取Bean对应节点的值
|
Object |
DefaultNodeBeanFactory.setValue(Object bean,
Object value,
BeanPath<Object> beanPath) |
T |
NodeBeanFactory.setValue(T bean,
Object value,
BeanPath<T> beanPath)
设置节点值
|
Copyright © 2024. All rights reserved.