Class NullExternalFactory

  • All Implemented Interfaces:
    PodamFactory

    public class NullExternalFactory
    extends AbstractExternalFactory
    Default implementation of an external factory which does nothing.
    Since:
    4.3.0
    Author:
    daivanov
    • Field Detail

      • LOG

        private static final org.slf4j.Logger LOG
        Application logger
    • Constructor Detail

      • NullExternalFactory

        private NullExternalFactory()
        Implementation of the Singleton pattern
    • Method Detail

      • getInstance

        public static NullExternalFactory getInstance()
        Instantiation method
        Returns:
        A singleton instance of this class
      • manufacturePojo

        public <T> T manufacturePojo​(Class<T> pojoClass,
                                     Type... genericTypeArgs)
        Generic method which returns an instance of the given class filled with dummy values, using the default data provider strategy.

        This method uses RandomDataProviderStrategyImpl as the default implementation.

        Type Parameters:
        T - The type for which a filled instance is required
        Parameters:
        pojoClass - The name of the class for which an instance filled with values is required
        genericTypeArgs - The generic Type arguments for a generic class instance
        Returns:
        An instance of <T> filled with dummy values
      • populatePojo

        public <T> T populatePojo​(T pojo,
                                  Type... genericTypeArgs)
        Description copied from interface: PodamFactory
        Generic method which populates an instance of the given class with dummy values, using the default data provider strategy.

        This method uses RandomDataProviderStrategyImpl as the default implementation.

        Type Parameters:
        T - The type for which a filled instance is required
        Parameters:
        pojo - The instance to be filled with values
        genericTypeArgs - The generic Type arguments for a generic class instance
        Returns:
        The same instance of object for chaining