Set<MethodConstraintViolation<Object>> violations = validator.unwrap(MethodValidator.class).validateAllParameters(ctx.getTarget(), ctx.getMethod(), ctx.getParameters());
if (!violations.isEmpty())
{
throw new MethodConstraintViolationException(getMessage(ctx.getMethod(), ctx.getParameters(), violations), violations);
}
Object result = ctx.proceed();
violations = validator.unwrap(MethodValidator.class).validateReturnValue(ctx.getTarget(), ctx.getMethod(), result);
if (!violations.isEmpty())
{
throw new MethodConstraintViolationException(getMessage(ctx.getMethod(), ctx.getParameters(), violations), violations);
}
return result;
}