Class PopulatorFactory


  • public final class PopulatorFactory
    extends Object
    Creates a Populator instance for the given class.
    • Constructor Detail

      • PopulatorFactory

        public PopulatorFactory()
    • Method Detail

      • getPopulator

        public static <O,​T> Optional<Populator> getPopulator​(Class<O> destObjectClass,
                                                                   Class<T> sourceObjectClass,
                                                                   BeanTransformer transformer)
        Creates an instance of the populator object based on the given class.
        Type Parameters:
        O - the generic type of the contained object in the destination object
        T - the generic type of the contained object in the source object
        Parameters:
        destObjectClass - the destination object class
        sourceObjectClass - the source object class
        transformer - the bean transformer containing the field name mapping and transformation functions
        Returns:
        the populator instance