code: public static void validate(Object parameter) {
          // Validation of top level payload is done outside
          if (parameter == null) {
              return;
          }
  
          Class<?> type = parameter.getClass();
          if (type == Double.class
                  || type == Float.class
                  || type == Long.class
                  || type == Integer.class
                  || type == Short.class
                  || type == Character.class
                  || type == Byte.class
                  || type == Boolean.class) {
              type = wrapperToPrimitive(type);
          }
          if (type.isPrimitive()
                  || type.isEnum()
                  || type.isAssignableFrom(Class.class)
                  || type.isAssignableFrom(LocalDate.class)
                  || type.isAssignableFrom(OffsetDateTime.class)
                  || type.isAssignableFrom(String.class)
                  || type.isAssignableFrom(DateTimeRfc1123.class)
                  || type.isAssignableFrom(Duration.class)) {
              return;
          }
  
          Annotation skipParentAnnotation = type.getAnnotation(SkipParentValidation.class);
          //
          if (skipParentAnnotation == null) {
              for (Class<?> c : TypeUtil.getAllClasses(type)) {
                  validateClass(c, parameter);
              }
          } else {
              validateClass(type, parameter);
          }
      }
docs: Validates a user provided required parameter to be not null.
  
  An {@link IllegalArgumentException} is thrown if a property fails the validation.
  
  @param parameter the parameter to validate
  @throws IllegalArgumentException thrown when the Validator determines the argument is invalid