Class PluginUtils


  • public final class PluginUtils
    extends java.lang.Object
    Internal utilities for plugin management.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> T[] mergePlugins​(T[] propagated, T[] explicit, java.util.function.Function<T,​java.lang.String> nameExtractor, org.slf4j.Logger log, java.lang.String propagatedSource, java.lang.Class<T> pluginClass)
      Merges propagated plugins with explicitly specified plugins.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • mergePlugins

        public static <T> T[] mergePlugins​(@Nullable
                                           T[] propagated,
                                           @Nullable
                                           T[] explicit,
                                           java.util.function.Function<T,​java.lang.String> nameExtractor,
                                           org.slf4j.Logger log,
                                           java.lang.String propagatedSource,
                                           java.lang.Class<T> pluginClass)
        Merges propagated plugins with explicitly specified plugins. Propagated plugins come first, followed by explicit plugins. Warns about duplicate plugin instances.
        Type Parameters:
        T - the plugin type
        Parameters:
        propagated - plugins propagated from a parent component (may be null or empty)
        explicit - plugins explicitly specified on this component (may be null or empty)
        nameExtractor - function to extract plugin name for logging
        log - logger for duplicate warnings
        propagatedSource - description of where propagated plugins come from (e.g., "service stubs", "client")
        Returns:
        merged array of plugins, never null