Package uk.co.jemos.podam.api
Class NullExternalFactory
- java.lang.Object
-
- uk.co.jemos.podam.api.AbstractExternalFactory
-
- uk.co.jemos.podam.api.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 Summary
Fields Modifier and Type Field Description private static org.slf4j.LoggerLOGApplication logger
-
Constructor Summary
Constructors Modifier Constructor Description privateNullExternalFactory()Implementation of the Singleton pattern
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NullExternalFactorygetInstance()Instantiation method<T> TmanufacturePojo(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.<T> TpopulatePojo(T pojo, Type... genericTypeArgs)Generic method which populates an instance of the given class with dummy values, using the default data provider strategy.-
Methods inherited from class uk.co.jemos.podam.api.AbstractExternalFactory
getClassStrategy, getExternalFactory, getStrategy, manufacturePojoWithFullData, setClassStrategy, setExternalFactory, setStrategy
-
-
-
-
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
RandomDataProviderStrategyImplas 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 requiredgenericTypeArgs- 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:PodamFactoryGeneric method which populates an instance of the given class with dummy values, using the default data provider strategy.This method uses
RandomDataProviderStrategyImplas the default implementation.- Type Parameters:
T- The type for which a filled instance is required- Parameters:
pojo- The instance to be filled with valuesgenericTypeArgs- The generic Type arguments for a generic class instance- Returns:
- The same instance of object for chaining
-
-