Class PluginListFactoryResolver<T>

java.lang.Object
org.apache.logging.log4j.plugins.di.resolver.AbstractPluginFactoryResolver<List<? extends T>>
org.apache.logging.log4j.plugins.di.resolver.PluginListFactoryResolver<T>
All Implemented Interfaces:
FactoryResolver<List<? extends T>>

public class PluginListFactoryResolver<T> extends AbstractPluginFactoryResolver<List<? extends T>>
Factory resolver for List<T> of plugin instances or factories within a namespace. Value types can be Supplier<T> to inject plugin factories instead of plugin instances.
  • Constructor Details

    • PluginListFactoryResolver

      public PluginListFactoryResolver()
  • Method Details

    • supportsType

      protected boolean supportsType(Type rawType, Type... typeArguments)
      Specified by:
      supportsType in class AbstractPluginFactoryResolver<List<? extends T>>
    • getFactory

      public Supplier<List<? extends T>> getFactory(ResolvableKey<List<? extends T>> resolvableKey, InstanceFactory instanceFactory)
      Description copied from interface: FactoryResolver
      Gets a factory for the given resolvable key using existing bindings from the given instance factory. A resolvable key in this context is a Key combined with alias names and the annotated element this factory is for.
      Parameters:
      resolvableKey - the resolvable key to create a binding for
      instanceFactory - the existing instance factory to use for composing bindings
      Returns:
      a factory for instances described by the provided key