1

It's 2009 and we still all hold on the JavaBeans despite all their flaws, mostly because of the tooling support which we wrote in our own blood.

But now we have method chaining and internal DSLs and some pressure to replace or extend JavaBeans with DSL classes. Has anyone an implementation that implements PropertyDescriptor for a DSL (where the getters and setter use the exact same name as the property) and a way to hook that into the Java RT so I don't need to create them all by myself?

4

2 回答 2

1

我不确定它是否是您需要的,但如果您查看 Spring 中的 BeanWrapper,它也许可以帮助您:(org.springframework.beans.BeanWrapperImpl参阅文档

于 2009-06-22T15:42:26.763 回答
0

使用在 jvm 上运行良好的 groovy 脚本语言。Groovy 对编写 DSL 有一流的支持。

于 2009-06-22T17:11:10.670 回答