I understand, in Java we have parameters validation solution. I believe JAX-RS has various annotations both for validation and data extraction. My question is, if I want to implement my own parameter validation class for a standalone Java application, how would I make sure that a method is executed only when its parameters have been validated? I am using Reflection to spot parameters with @LowerCaseCheck and then performing validation on it, but not sure where to place this validation code.
public void print(@LowerCaseCheck String lowerCaseString) {
....
}