Package org.instancio.generator
Class GeneratorResult
- java.lang.Object
-
- org.instancio.generator.GeneratorResult
-
public final class GeneratorResult extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GeneratorResult
create(Object value)
static GeneratorResult
create(Object value, GeneratedHints hints)
GeneratedHints
getHints()
Object
getValue()
boolean
ignoreChildren()
static GeneratorResult
nullResult()
This result indicates that a null was generated, therefore the target's value should be set to null.String
toString()
-
-
-
Method Detail
-
nullResult
public static GeneratorResult nullResult()
This result indicates that a null was generated, therefore the target's value should be set to null. If the target is a field with a pre-initialised default value, it will be overwritten with a null value.An actual
null
GeneratorResult
means that the target field will be ignored (it would retain its default value, if any).- Returns:
- null result
-
create
public static GeneratorResult create(@Nullable Object value)
-
create
public static GeneratorResult create(@Nullable Object value, @Nullable GeneratedHints hints)
-
getValue
public Object getValue()
-
ignoreChildren
public boolean ignoreChildren()
-
getHints
public GeneratedHints getHints()
-
-