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.

Since:
2.0.0
See Also:
  • Method Details

    • targetClass

      public Class<?> 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 from onComplete 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

      public String toString()
      Overrides:
      toString in class Object
    • builder

      public static InternalGeneratorHint.Builder builder()