Jakarta commons-beanutils PropertyUtils replacement.
Install:
<dependency>
<groupId>eu.qualityontime.commons</groupId>
<artifactId>q-beanutils</artifactId>
<version>0.8</version>
</dependency>
Plan:
- [Done] Wrap of Jakarta commons PropertyUtils to avoid checked excecptions and adding some generics friendly method.
- [Done] Take over jakarta commons implementation and eliminate the use of DynaBeans.
- [Prog]Add field access by the
@
notation. Example:attr1.@field1
- [Done]set and get field
- copy properties map to field
- copy properties obj from field/attr to field/attr
- Make it working with non public beans.
- [Done] Add null attribute access. Example:
attr1?.attr2
- Add collection accessors. Example. Taken
attr1
as aList
expressionattr1*.attr2
gets all the attr2 values in collection. See Groovy spread operator. (http://docs.groovy-lang.org/latest/html/documentation/#_spread_operator)
Nullable attribute access has a limitation.
When the attribute is accesse like getIndexedProp(int index)
then the underlying method must take care of nullability.
As QPropertyUtils
is behaving like commona PropertyUtils most behaviours are the same (http://commons.apache.org/proper/commons-beanutils/javadocs/v1.9.3/apidocs/org/apache/commons/beanutils/package-summary.html)