1

I have a requirement where I need to traverse a hierarchy of Java beans and the hierarchy is different based on the starting point. What would be ideal is if I would be able to use the "dot operator" from JSTL in my Java class.

Then I can have a static map of Strings to describe my hierarchy..something like:

clazz1=attribute1.attribute2
clazz2=attribute3.attribute4

I look up which class and which attributes I need to drill down and go to the root object.

I am coding for it anyway, just checking if BeanUtils etc had such a facility already since seems to me like it can be an useful feature.

4

1 回答 1

0

您可以在 groovy 中编写一些代码 - 它编译为 java 字节码,因此可以完美地互操作。

于 2012-10-10T14:07:11.730 回答