code: private static boolean isConstraint(Annotation annotation) {
          return annotation.annotationType().isAnnotationPresent(Constraint.class)
                  || annotation.annotationType().equals(Valid.class);
      }
docs: Determines whether the given annotation is a 'constraint' or not.
  It just checks if the annotation has the {@link Constraint} annotation on it or if the annotation is the {@link
  Valid} annotation.
  
  @param annotation the annotation to check
  @return {@code true} if the given annotation is a constraint