POJO validation is a bit of a hassle, especially if you are trying to protect your objects state by beeing restrictive on the get/set methods. Often you have to open up the object because of needs from webframeworks etc. At the JavaBin forums I came across OVal which tries to solve validation problems through annotations and aspects. Looks interesting and I’ll have to take a look at it whenever I get lucky enough to develop on a Java 5 project. 😉
Categories