Package com.expediagroup.beans.populator
Class PopulatorFactory
- java.lang.Object
-
- com.expediagroup.beans.populator.PopulatorFactory
-
public final class PopulatorFactory extends java.lang.Object
Creates aPopulator
instance for the given class.
-
-
Constructor Summary
Constructors Constructor Description PopulatorFactory()
-
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.
-
-
-
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 objectT
- the generic type of the contained object in the source object- Parameters:
destObjectClass
- the destination object classsourceObjectClass
- the source object classtransformer
- the bean transformer containing the field name mapping and transformation functions- Returns:
- the populator instance
-
-