Package org.instancio.internal.generator
Class InternalGeneratorHint
java.lang.Object
org.instancio.internal.generator.InternalGeneratorHint
- All Implemented Interfaces:
Hint<InternalGeneratorHint>
@InternalApi
public final class InternalGeneratorHint
extends Object
implements Hint<InternalGeneratorHint>
Internal hint related to
Generators
.
This class is not part of the public API.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
boolean
A hint indicating whether the generated object should be excluded fromonComplete
callbacks.boolean
A hint indicating whether a generator delegates instantiation to another generator.boolean
Indicates whether the value to generate is nullable.Class<?>
A hint indicating the type of object to generate.toString()
-
Method Details
-
targetClass
A hint indicating the type of object to generate.Some generators may request a specific type to generate. For example, collection generators may accept types via
subtype()
method.- Returns:
- target class
- Since:
- 2.0.0
-
isDelegating
public boolean isDelegating()A hint indicating whether a generator delegates instantiation to another generator. This occurs when the generator does not have enough information to determine which type to instantiate.- Returns:
true
a generator is delegating,false
otherwise- Since:
- 2.0.0
-
excludeFromCallbacks
public boolean excludeFromCallbacks()A hint indicating whether the generated object should be excluded fromonComplete
callbacks.- Returns:
true
if callbacks should not be invoked on generated object- Since:
- 2.0.0
-
nullableResult
public boolean nullableResult()Indicates whether the value to generate is nullable.- Returns:
true
if null is allowed to be generated- Since:
- 2.0.0
-
toString
-
builder
-