Package org.instancio.generator.misc
Class InstantiatingGenerator
java.lang.Object
org.instancio.generator.AbstractGenerator<Object>
org.instancio.generator.misc.InstantiatingGenerator
- All Implemented Interfaces:
Generator<Object>
,GeneratorSpec<Object>
-
Constructor Summary
ConstructorDescriptionInstantiatingGenerator
(GeneratorContext context, Instantiator instantiator, Class<?> targetType) -
Method Summary
Methods inherited from class org.instancio.generator.AbstractGenerator
getContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.instancio.Generator
apiMethodName, getHints, isDelegating, setDelegate, supports, targetClass
-
Constructor Details
-
InstantiatingGenerator
public InstantiatingGenerator(GeneratorContext context, Instantiator instantiator, Class<?> targetType)
-
-
Method Details
-
generate
Description copied from interface:Generator
Returns a generated value.If the generated value is random, it needs to be generated using the given
Random
instance. This ensures the data is generated with the same seed value and allows random data to be reproduced by specifying the seed value.- Parameters:
random
- provider for random values- Returns:
- generated value
-