private void classifyMethodNoArgs(ExecutableElement method) {
    Optional<String> getterProperty = propertyForBuilderGetter(method);
    if (getterProperty.isPresent()) {
      classifyGetter(method, getterProperty.get());
      return;
    }

    String methodName = method.getSimpleName().toString();
    TypeMirror returnType = builderMethodReturnType(method).getType();

    if (methodName.endsWith("Builder")) {
      String prefix = methodName.substring(0, methodName.length() - "Builder".length());
      String property =
          rewrittenPropertyTypes.containsKey(prefix)
              ? prefix
              : rewrittenPropertyTypes.keySet().stream()
                  .filter(p -> PropertyNames.decapitalizeNormally(p).equals(prefix))
                  .findFirst()
                  .orElse(null);
      if (property != null) {
        PropertyBuilderClassifier propertyBuilderClassifier =
            new PropertyBuilderClassifier(
                errorReporter,
                typeUtils,
                elementUtils,
                this,
                this::propertyIsNullable,
                rewrittenPropertyTypes,
                nullables);
        Optional<PropertyBuilder> propertyBuilder =
            propertyBuilderClassifier.makePropertyBuilder(method, property);
        if (propertyBuilder.isPresent()) {
          propertyNameToPropertyBuilder.put(property, propertyBuilder.get());
        }
        return;
      }
    }

    if (TYPE_EQUIVALENCE.equivalent(returnType, builtType)) {
      buildMethods.add(method);
    } else {
      errorReporter.reportError(
          method,
          "[%1$sBuilderNoArg] Method without arguments should be a build method returning"
              + " %2$s, or a getter method with the same name and type as %3$s,"
              + " or fooBuilder() where %4$s is %3$s",
          // "where foo() or getFoo() is a method in..." or "where foo is a parameter of..."
          autoWhat(),
          builtType,
          getterMustMatch(),
          fooBuilderMustMatch());
    }
  }
Classifies a method given that it has no arguments. Currently a method with no arguments can be
a {@code build()} method, meaning that its return type must be the {@code @AutoValue} class; it
can be a getter, with the same signature as one of the property getters in the
{@code @AutoValue} class; or it can be a property builder, like {@code
ImmutableList.Builder<String> foosBuilder()} for the property defined by {@code
ImmutableList<String> foos()} or {@code getFoos()}.
value/src/main/java/com/google/auto/value/processor/BuilderMethodClassifier.java