Class PopulatorFactory


  • public final class PopulatorFactory
    extends java.lang.Object
    Creates a Populator instance for the given class.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <O,​T>
      java.util.Optional<Populator>
      getPopulator​(java.lang.Class<O> destObjectClass, java.lang.Class<T> sourceObjectClass, BeanTransformer transformer)
      Creates an instance of the populator object based on the given class.
      • Methods inherited from class java.lang.Object

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

      • PopulatorFactory

        public PopulatorFactory()
    • Method Detail

      • getPopulator

        public static <O,​T> java.util.Optional<Populator> getPopulator​(java.lang.Class<O> destObjectClass,
                                                                             java.lang.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