private TypeMirror getAnnotatedType(Element element) {
    List<TypeElement> types = ImmutableList.of();
    while (types.isEmpty()) {
      types = ElementFilter.typesIn(Arrays.asList(element));
      element = element.getEnclosingElement();
    }
    return Iterables.getOnlyElement(types).asType();
  }
If non-null, we will call this whenever the {@link #process} method is called, giving it one of
the {@code @AutoFactory} elements, and do nothing else.
factory/src/main/java/com/google/auto/factory/processor/AutoFactoryProcessor.java