Class TextPatternGenerator
java.lang.Object
org.instancio.internal.generator.AbstractGenerator<String>
org.instancio.internal.generator.text.TextPatternGenerator
- All Implemented Interfaces:
Generator<String>
,GeneratorSpec<String>
,NullableGeneratorSpec<String>
,ValueSpec<String>
-
Constructor Summary
ConstructorsConstructorDescriptionTextPatternGenerator
(String pattern) TextPatternGenerator
(GeneratorContext context, String pattern) -
Method Summary
Methods inherited from class org.instancio.internal.generator.AbstractGenerator
getContext, hints, isNullable, nullable, nullable
-
Constructor Details
-
TextPatternGenerator
-
TextPatternGenerator
-
-
Method Details
-
apiMethod
Description copied from class:AbstractGenerator
Returns the public API method name of the generator spec. The returned name is used for reporting validation errors.- Specified by:
apiMethod
in classAbstractGenerator<String>
- Returns:
- spec name if defined, or
null
otherwise
-
generate
Description copied from interface:Generator
Returns a generated value.If this method produces random data, the data needs to be generated using the provided
Random
instance. This ensures generated values are reproducible for a given seed value.
-