private void addToFoundedPlugin(ServiceLoader<T> loader) {
    loader.forEach(
        plugin -> {
          T exists = foundedPlugins.putIfAbsent(plugin.name(), plugin);
          if (exists != null && !exists.getClass().equals(plugin.getClass())) {
            throw new IllegalStateException(
                "Plugin name "
                    + plugin.name()
                    + " conflict, current plugin class: "
                    + plugin.getClass().getName()
                    + ", existing plugin class"
                    + exists.getClass().getName());
          }
        });
  }
Visit all installed plugins.

@param visitor function to visit all installed plugins.
amoro-ams/src/main/java/org/apache/amoro/server/manager/AbstractPluginManager.java