return descriptor != null && descriptor.hasConstrainedParameters();
}
public void validate(@Observes MethodReady event, ControllerInstance controllerInstance, MethodInfo methodInfo,
Validator validator) {
ControllerMethod method = event.getControllerMethod();
if (hasConstraints(method)) {
Set<ConstraintViolation<Object>> violations = bvalidator.forExecutables().validateParameters(
controllerInstance.getController(), method.getMethod(), methodInfo.getParametersValues());
logger.debug("there are {} constraint violations at method {}.", violations.size(), method);
for (ConstraintViolation<Object> v : violations) {
String category = extractCategory(methodInfo.getValuedParameters(), v);