Type Parameters:
T - type of object generated
All Superinterfaces:
Generator<T>
All Known Implementing Classes:
ObjectDefaultMappingGenerator, ObjectGeneratorImpl

public interface ObjectGenerator<T> extends Generator<T>
Declarative object generator definition.

User should call implementation of ObjectGenerator as follows:


 ObjectGenerator<T> g;
 Generator<R> methodGenerator;
 g.on(g.getRecorder().method()).returns(methodGenerator);
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Implementation of T that is used to define the method a generator should be defined for.
    on(R value)
    Define a method a generator should be defined for.

    Methods inherited from interface de.cuioss.test.generator.internal.net.java.quickcheck.Generator

    next
  • Method Details

    • getRecorder

      Implementation of T that is used to define the method a generator should be defined for.
      Returns:
      an implementation of T used only to record method calls
    • on

      <R> ObjectGenerator.ReturnValue<R> on(R value)
      Define a method a generator should be defined for.
      Type Parameters:
      R - type of the return type
      Parameters:
      value - is ignored
      Returns:
      ObjectGenerator.ReturnValue instance to define a generator for this method