private static void specifyTypes(@NotNull final Set<String> types, @NotNull final List<String> supportedTypes) {
        if (types.isEmpty()) {
          types.addAll(supportedTypes);
        }
        else {
          types.retainAll(supportedTypes);
        }
      }
private static void specifyTypes(@NotNull final Set<String> types, @NotNull final List<String> supportedTypes)