private Set<Class<?>> getVisitorAcceptClasses(@NotNull List<? extends Class<?>> acceptingPsiTypes) {
    Map<Class<?>, Collection<Class<?>>> targetPsiClasses = myTargetPsiClasses;
    if (acceptingPsiTypes.size() == 1) {
      return Set.copyOf(targetPsiClasses.getOrDefault(acceptingPsiTypes.get(0), Collections.emptyList()));
    }

    Set<Class<?>> accepts = null;
    for (Class<?> psiType : acceptingPsiTypes) {
      Collection<Class<?>> classes = targetPsiClasses.getOrDefault(psiType, Collections.emptyList());
      if (!classes.isEmpty()) {
        if (accepts == null) {
          accepts = new HashSet<>(classes);
        }
        else {
          accepts.addAll(classes);
        }
      }
    }

    return accepts;
  }
private Set<Class<?>> getVisitorAcceptClasses(@NotNull List<? extends Class<?>> acceptingPsiTypes)