Interface IMappedByNameFactory<T>

Type Parameters:
T -
All Known Subinterfaces:
IMappedFormFactory, IMappedProcessFactory
All Known Implementing Classes:
MappedByNameFactory, MappedFormFactory, MappedProcessFactory

public interface IMappedByNameFactory<T>
Generic base interface for factory service that provide name/classname to instance mapping service
Author:
hengsin
  • Method Details

    • addMapping

      void addMapping(String name, Supplier<T> supplier)
      add name to class mapping
      Parameters:
      name -
      supplier -
    • removeMapping

      void removeMapping(String name)
      remove name to class mapping
      Parameters:
      name -
    • getSupplier

      Supplier<T> getSupplier(String name)
      Parameters:
      name -
      Returns:
      Supplier
    • newInstance

      default T newInstance(String name)
      Parameters:
      name -
      Returns:
      new instance of T (if there are register supplier for name)