Class FactoryCreator

Object
FactoryRegistry
FactoryCreator

public class FactoryCreator extends FactoryRegistry
A factory registry capable to creates factories if no appropriate instance was found in the registry.

This class maintains a cache of previously created factories, as weak references. Calls to getFactory(Class, Predicate, Hints, Hints.Key)} first check if a previously created factory can fit.

Since:
2.1
Author:
Martin Desruisseaux, Jody Garnett
  • Constructor Details

    • FactoryCreator

      public FactoryCreator(Class<?> category)
      Constructs a new registry for the specified category.
      Parameters:
      category - The single category.
      Since:
      2.4
    • FactoryCreator

      public FactoryCreator(Class<?>... categories)
      Constructs a new registry for the specified categories.
      Parameters:
      categories - The categories.
      Since:
      2.4
    • FactoryCreator

      public FactoryCreator(Collection<Class<?>> categories)
      Constructs a new registry for the specified categories.
      Parameters:
      categories - The categories.
  • Method Details