Is there a way to use annotations in Java to replace accessors?

前端 未结 7 1114
旧时难觅i
旧时难觅i 2020-12-14 22:50

I\'m a little new to the Java 5 annotations and I\'m curious if either of these are possible:

This annotation would generate a simple getter and setter for you.

7条回答
  •  轮回少年
    2020-12-14 23:21

    There is project named OVal and i think it does what you want. http://oval.sourceforge.net/

    If i remeber right for advance thing AspectJ is needed, however simple check work without AspectJ. check it out.

    There is also Hibernate Validator, check it out too :P

提交回复
热议问题