Interface Generator<T>
-
- All Known Implementing Classes:
BlockingDequeGenerator,BooleanGenerator,ByteGenerator,CharacterGenerator,DateGenerator,DoubleGenerator,FloatGenerator,GenericCollectionGenerator,GenericMapGenerator,InstantGenerator,IntegerGenerator,ListGenerator,LocalDateGenerator,LocalDateTimeGenerator,LongGenerator,MapGenerator,NavigableMapGenerator,NavigableSetGenerator,OffsetDateTimeGenerator,QueueGenerator,SetGenerator,ShortGenerator,StringGenerator,ZonedDateTimeGenerator
public interface Generator<T>Interface that will generate the classes that it supports.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tgenerate(Class<?> clazz, Field field, Limiter limiter, PojoBuilderConfiguration pojoBuilderConfiguration)Generates an instance of this class with random test databooleansupportsType(Class<?> clazz)Returns true if this Generator can generate an instance of this class.
-
-
-
Method Detail
-
generate
T generate(Class<?> clazz, Field field, Limiter limiter, PojoBuilderConfiguration pojoBuilderConfiguration)
Generates an instance of this class with random test data- Parameters:
clazz- class to createfield- used to determine generic type (i.e. collections)limiter- used to limit the randomness of the datapojoBuilderConfiguration- The pojo builder configuration used to create objects in case the generator needs to create an object, it can come with user provided generators, providers, etc.- Returns:
-
supportsType
boolean supportsType(Class<?> clazz)
Returns true if this Generator can generate an instance of this class.- Parameters:
clazz- class instance to check- Returns:
- true if it can create an instance of that class.
-
-