| Modifier and Type | Method and Description |
|---|---|
static <T,O,K extends Collection<T>> |
getPropertyValueCollection(Iterable<O> beanIterable,
String propertyName,
K returnCollection)
循环
beanIterable,调用 PropertyUtil.getProperty(Object, String) 获得 propertyName的值,塞到 returnCollection
中返回. |
static <T,O> T |
getValue(O obj,
PropertyDescriptor propertyDescriptor)
Gets the value.
|
public static <T,O,K extends Collection<T>> K getPropertyValueCollection(Iterable<O> beanIterable, String propertyName, K returnCollection)
beanIterable,调用 PropertyUtil.getProperty(Object, String) 获得 propertyName的值,塞到 returnCollection
中返回.T - the generic typeO - the generic typeK - the key typebeanIterable - 支持
<User>,Set<User>等List<Map<String, String>>List<List<String>>List<String[]>propertyName - 泛型O对象指定的属性名称,Possibly indexed and/or nested name of the property to be modified,参见
propertyNamereturnCollection - the return collectionreturnCollection 是null,抛出 NullPointerExceptionbeanIterable 是null或者empty,返回 returnCollectionpropertyName 是null,抛出 NullPointerExceptionpropertyName 是blank,抛出 IllegalArgumentExceptionPropertyUtil.getProperty(Object, String),
BeanToPropertyValueTransformerpublic static <T,O> T getValue(O obj,
PropertyDescriptor propertyDescriptor)
T - the generic typeO - the generic typeobj - the objpropertyDescriptor - the property descriptorobj 是null,抛出 NullPointerExceptionpropertyDescriptor 是null,抛出 NullPointerExceptionCopyright © 2008-2019 by feilong