Class EmailAddressGenerator
java.lang.Object
org.instancio.internal.generator.AbstractGenerator<String>
org.instancio.internal.generator.text.EmailAddressGenerator
- All Implemented Interfaces:
Generator<String>
,GeneratorSpec<String>
,NullableGeneratorSpec<String>
,InternalLengthGeneratorSpec<String>
public class EmailAddressGenerator
extends AbstractGenerator<String>
implements NullableGeneratorSpec<String>, InternalLengthGeneratorSpec<String>
Internal generator used for generating email addresses for fields annotated
with
@Email
annotation from Jakarta Bean Validation API.-
Constructor Summary
-
Method Summary
Methods inherited from class org.instancio.internal.generator.AbstractGenerator
getContext, hints, isNullable
-
Constructor Details
-
EmailAddressGenerator
-
-
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
-
nullable
Description copied from interface:NullableGeneratorSpec
Indicates thatnull
value can be generated.- Specified by:
nullable
in interfaceNullableGeneratorSpec<String>
- Overrides:
nullable
in classAbstractGenerator<String>
- Returns:
- spec builder
-
nullable
- Overrides:
nullable
in classAbstractGenerator<String>
-
length
- Specified by:
length
in interfaceInternalLengthGeneratorSpec<String>
-
length
-
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.
-