static Optional<BuilderMethodClassifier<ExecutableElement>> classify(
      Iterable<ExecutableElement> methods,
      ErrorReporter errorReporter,
      ProcessingEnvironment processingEnv,
      TypeElement autoValueClass,
      TypeElement builderType,
      ImmutableBiMap<ExecutableElement, String> getterToPropertyName,
      ImmutableMap<String, AnnotatedTypeMirror> rewrittenPropertyTypes,
      Nullables nullables,
      boolean autoValueHasToBuilder) {
    BuilderMethodClassifier<ExecutableElement> classifier =
        new BuilderMethodClassifierForAutoValue(
            errorReporter,
            processingEnv,
            autoValueClass.asType(),
            builderType,
            getterToPropertyName,
            rewrittenPropertyTypes,
            nullables);
    if (classifier.classifyMethods(methods, autoValueHasToBuilder)) {
      return Optional.of(classifier);
    } else {
      return Optional.empty();
    }
  }
Classifies the given methods from a builder type and its ancestors.

@param methods the abstract methods in {@code builderType} and its ancestors.
@param errorReporter where to report errors.
@param processingEnv the {@link ProcessingEnvironment} for annotation processing.
@param autoValueClass the {@code AutoValue} class containing the builder.
@param builderType the builder class or interface within {@code autoValueClass}.
@param getterToPropertyName a map from getter methods to the properties they get.
@param rewrittenPropertyTypes a map from property names to types. The types here use type
    parameters from the builder class (if any) rather than from the {@code AutoValue} class,
    even though the getter methods are in the latter.
@param autoValueHasToBuilder true if the containing {@code @AutoValue} class has a {@code
    toBuilder()} method.
@return an {@code Optional} that contains the results of the classification if it was
    successful or nothing if it was not.
value/src/main/java/com/google/auto/value/processor/BuilderMethodClassifierForAutoValue.java