Set<MethodConstraintViolation<Object>> parametersViolations = methodValidator.validateParameters(
pjp.getTarget(), signature.getMethod(), pjp.getArgs()
);
if ( !parametersViolations.isEmpty() ) {
throw new MethodConstraintViolationException( parametersViolations );
}
result = pjp.proceed(); //Execute the method
Set<MethodConstraintViolation<Object>> returnValueViolations = methodValidator.validateReturnValue(
pjp.getTarget(), signature.getMethod(), result
);
if ( !returnValueViolations.isEmpty() ) {
throw new MethodConstraintViolationException( returnValueViolations );
}
return result;
}