static Optional<AnnotationMirror> getAnnotationMirror(
      Element element, Class<? extends Annotation> annotationType) {
    String annotationName = annotationType.getName();
    return element.getAnnotationMirrors().stream()
        .filter(a -> getQualifiedName(a.getAnnotationType()).contentEquals(annotationName))
        .<AnnotationMirror>map(x -> x) // get rid of wildcard <? extends AnnotationMirror>
        .findFirst();
  }
Get the {@link AnnotationMirror} for the type {@code annotationType} present on the given
{@link Element} if it exists.
factory/src/main/java/com/google/auto/factory/processor/Mirrors.java