@Override
  protected final void processAnnotationOnClass(MethodMetadata data, Class<?> targetType) {
    final List<GuardedAnnotationProcessor> processors =
        Arrays.stream(targetType.getAnnotations())
            .flatMap(
                annotation ->
                    classAnnotationProcessors.stream()
                        .filter(processor -> processor.test(annotation)))
            .collect(Collectors.toList());

    if (!processors.isEmpty()) {
      Arrays.stream(targetType.getAnnotations())
          .forEach(
              annotation ->
                  processors.stream()
                      .filter(processor -> processor.test(annotation))
                      .forEach(processor -> processor.process(annotation, data)));
    } else {
      if (targetType.getAnnotations().length == 0) {
        data.addWarning(
            String.format(
                "Class %s has no annotations, it may affect contract %s",
                targetType.getSimpleName(), getClass().getSimpleName()));
      } else {
        data.addWarning(
            String.format(
                "Class %s has annotations %s that are not used by contract %s",
                targetType.getSimpleName(),
                Arrays.stream(targetType.getAnnotations())
                    .map(annotation -> annotation.annotationType().getSimpleName())
                    .collect(Collectors.toList()),
                getClass().getSimpleName()));
      }
    }
  }
Called by parseAndValidateMetadata twice, first on the declaring class, then on the target type
(unless they are the same).

@param data metadata collected so far relating to the current java method.
@param targetType the class to process
core/src/main/java/feign/DeclarativeContract.java