public interface ObjectCreator
ObjectCreator is to create object of the type provided.
The default ones are :
1. EnumGenerator : That will generate a random enumeration.
2. PrimitiveGenerator : That will handle all those field types :
- int, Integer, boolean, Boolean, float, Float, double, Double,
BigDecimal, long, Long, short, Short, byte, Byte
- char, Character, String
- Date, Date, Timestamp, Calendar
- Subtype of Exception
3. CollectionGenerator :
- It will handle the classes assignables from : Map, Set, List and the arrays
- It will go down the tree even if types like this : HashMapBuilderGenerator :
- It will check if the class specifies a "build" method and will fill in the Builder object fields by reflection.
5. LastResortGenerator :
- It will generate the class through reflection, using all the fields collected by the TreeNodeCreator.| Modifier and Type | Method and Description |
|---|---|
Object |
createRandomObject(Type bean) |
Copyright © 2013. All Rights Reserved.