code: public AnnotationType annotationTargetType(Attribute.Compound a, Symbol s) {
          List<Attribute> targets = annotationTargets(a.type.tsym);
          return (targets == null) ?
                  AnnotationType.DECLARATION :
                  targets.stream()
                          .map(attr -> targetToAnnotationType(attr, s))
                          .reduce(AnnotationType.NONE, this::combineAnnotationType);
      }
docs: Determine whether an annotation is a declaration annotation,
  a type annotation, or both.