private ImmutableSetMultimap<TypeElement, Element> indexByAnnotation(
      Set<ElementFactory> annotatedElementFactories, ImmutableSet<TypeElement> annotationTypes) {
    ImmutableSetMultimap.Builder<TypeElement, Element> deferredElementsByAnnotationTypeBuilder =
        ImmutableSetMultimap.builder();
    for (ElementFactory elementFactory : annotatedElementFactories) {
      Element element = elementFactory.getElement(elementUtils);
      if (element != null) {
        for (TypeElement annotationType : annotationTypes) {
          if (isAnnotationPresent(element, annotationType)) {
            deferredElementsByAnnotationTypeBuilder.put(annotationType, element);
          }
        }
      }
    }
    return deferredElementsByAnnotationTypeBuilder.build();
  }
Returns the superficially validated annotated elements of this round, including the validated
previously ill-formed elements. Also update {@link #deferredEnclosingElements}.

<p>Note that the elements deferred by processing steps are guaranteed to be well-formed;
therefore, they are ignored (not returned) here, and they will be considered directly in the
{@link #process(ImmutableSetMultimap)} method.
common/src/main/java/com/google/auto/common/BasicAnnotationProcessor.java