Package org.jeasy.random
Class ObjenesisObjectFactory
java.lang.Object
org.jeasy.random.ObjenesisObjectFactory
- All Implemented Interfaces:
ObjectFactory
Objenesis based factory to create "fancy" objects: immutable java beans, generic types, abstract and interface types.
- Author:
- Mahmoud Ben Hassine ([email protected])
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> T
createInstance
(Class<T> type, RandomizerContext context) Create a new instance oftype
in the given randomization context.
-
Constructor Details
-
ObjenesisObjectFactory
public ObjenesisObjectFactory()
-
-
Method Details
-
createInstance
Description copied from interface:ObjectFactory
Create a new instance oftype
in the given randomization context.- Specified by:
createInstance
in interfaceObjectFactory
- Type Parameters:
T
- generic type- Parameters:
type
- to createcontext
- current randomization context- Returns:
- new instance of the given type
-