docs: public static Stream<Compound> getDeclarationAndTypeAttributes(Symbol sym) {
      Symbol typeAnnotationOwner;
      switch (sym.getKind()) {
        case PARAMETER:
          typeAnnotationOwner = sym.owner;
          break;
        default:
          typeAnnotationOwner = sym;
      }
      return Streams.concat(
              sym.getRawAttributes().stream(),
              typeAnnotationOwner.getRawTypeAttributes().stream()
                  .filter(anno -> isAnnotationOnType(sym, anno.position)))
          .collect(
              groupingBy(c -> c.type.asElement().getQualifiedName(), LinkedHashMap::new, toList()))
          .values().stream()
          .map(c -> c.get(0));
    }