Package org.instancio.generator
Class GeneratorContext
java.lang.Object
org.instancio.generator.GeneratorContext
Provides additional information, such as settings and a random
instance to generators that require it.
- Since:
- 1.0.3
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a read-only instance of the settings used by Instancio.random()
Returns the random instance used by Instancio to generate data.
-
Constructor Details
-
GeneratorContext
-
-
Method Details
-
getSettings
Returns a read-only instance of the settings used by Instancio.The returned settings includes overrides specified using
InstancioApi.withSettings(Settings)
@WithSettings
annotation used withInstancioExtension
for JUnit 5
- Returns:
- the settings
- Since:
- 1.0.3
-
random
Returns the random instance used by Instancio to generate data.Using this instance ensures that data will be reproducible.
- Returns:
- the random instance
- Since:
- 1.0.3
-