private static Parameter forVariableElement(
      VariableElement variable, TypeMirror type, Types types, InjectApi injectApi) {
    ImmutableList<AnnotationMirror> allAnnotations =
        Stream.of(variable.getAnnotationMirrors(), type.getAnnotationMirrors())
            .flatMap(List::stream)
            .collect(toImmutableList());
    Optional<AnnotationMirror> nullable =
        allAnnotations.stream().filter(Parameter::isNullable).findFirst();
    Key key = Key.create(type, allAnnotations, types, injectApi);

    ImmutableSet<Equivalence.Wrapper<AnnotationMirror>> typeAnnotationWrappers =
        type.getAnnotationMirrors().stream()
            .map(AnnotationMirrors.equivalence()::wrap)
            .collect(toImmutableSet());
    ImmutableList<Equivalence.Wrapper<AnnotationMirror>> parameterAnnotationWrappers =
        variable.getAnnotationMirrors().stream()
            .map(AnnotationMirrors.equivalence()::wrap)
            .filter(annotation -> !typeAnnotationWrappers.contains(annotation))
            .collect(toImmutableList());

    return new AutoValue_Parameter(
        MoreTypes.equivalence().wrap(type),
        variable.getSimpleName().toString(),
        key,
        parameterAnnotationWrappers,
        wrapOptionalInEquivalence(AnnotationMirrors.equivalence(), nullable));
  }
Annotations on the parameter (not its type).
factory/src/main/java/com/google/auto/factory/processor/Parameter.java