@Override
  public boolean process(
      Set<? extends TypeElement> annotations, RoundEnvironment roundEnvironment) {
    Types types = processingEnv.getTypeUtils();
    Elements elements = processingEnv.getElementUtils();
    TypeElement toPrettyString = elements.getTypeElement(TO_PRETTY_STRING_NAME);

    Set<ExecutableElement> annotatedMethods =
        methodsIn(roundEnvironment.getElementsAnnotatedWith(toPrettyString));
    for (ExecutableElement method : annotatedMethods) {
      validateMethod(method, elements);
    }

    validateSingleToPrettyStringMethod(annotatedMethods, types, elements);

    return false;
  }
An annotation processor that validates {@link
com.google.auto.value.extension.toprettystring.ToPrettyString} usage.
value/src/main/java/com/google/auto/value/extension/toprettystring/processor/ToPrettyStringValidator.java