@Override
    public boolean equals(@Nullable Object object) {
      if (this == object) {
        return true;
      } else if (!(object instanceof ExecutableElementFactory)) {
        return false;
      }

      ExecutableElementFactory that = (ExecutableElementFactory) object;
      return this.simpleName.equals(that.simpleName)
          && this.sameNameIndex == that.sameNameIndex
          && this.enclosingTypeElementFactory.equals(that.enclosingTypeElementFactory);
    }
The index of the element among all elements of the same kind within the enclosing type. If
this is method {@code foo(...)} and the index is 0, that means that the method is the first
method called {@code foo} in the enclosing type.
common/src/main/java/com/google/auto/common/BasicAnnotationProcessor.java