[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ews.eclipse.technology.aspectj] Re: Trying to pick up annotations on args

Hi Barry,

Yes, I was aware of Hibernate validator, but like you I haven't used it. Here's the bit from the page you referenced that I think applies:

ClassValidator personValidator = new ClassValidator( Person.class );
InvalidValue[] validationMessages = personValidator.getInvalidValues(person);


where Person would be annotated similarly to my example.

But this isn't quite the same as what I was doing, because it requires the client of the (person) object to ask a 3rd party (personValidator) if it is valid before interacting with it.

I suspect at the end of the day they are doing similar things to mine in terms of reflection etc.

Cheers
Dan