// JSR 303 doesn't support method level validation
// we should provide at least a dummy implementation to detect @NotNull annotations
// we should migrate our implementation to bean validation 1.1 when possible
final Parameter parameter = invokable.getParameters().get(i);
final NotNull annotation = parameter.getAnnotation(NotNull.class);
if (annotation != null) {
final String parameterName = "arg" + i;
final ConstraintDescriptor<NotNull> descriptor = new SimpleConstraintDescriptor<NotNull>(
annotation, ImmutableSet.<Class<?>>of(Default.class),
ImmutableList.<Class<? extends ConstraintValidator<NotNull, ?>>>of(
NotNullValidator.class), null);
final ConstraintViolation<Object> violation = new MethodConstraintValidationHolder<Object>(
// message
"may not be null",
// messageTemplate
annotation.message(),
// rootBean
invocationContext.getProxy(),
// leafBean (the object the method is executed on)