public class BeanPath extends Object implements Iterator<BeanPath>
表达式栗子:
persion persion.name persons[3] person.friends[5].name ['person']['friends'][5]['name']
| Modifier and Type | Method and Description |
|---|---|
String |
getChild()
获取子表达式
|
Node |
getNode()
获取节点
|
Object |
getValue(Object bean)
获取路径对应的值
|
boolean |
hasNext() |
BeanPath |
next() |
static BeanPath |
of(String expression)
创建Bean路径
|
Object |
setValue(Object bean,
Object value)
设置路径对应的值,如果路径节点为空,自动创建之
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEachRemaining, removepublic BeanPath(String expression)
expression - 表达式public static BeanPath of(String expression)
expression - 表达式public Node getNode()
public String getChild()
public Object setValue(Object bean, Object value)
bean - Bean对象value - 设置的值Copyright © 2024. All rights reserved.