net.java.quickcheck
Interface ObjectGenerator<T>

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 g;
Generator methodGenerator;
g.on(g.getRecorder().method()).returns(methodGenerator);


Nested Class Summary
static interface ObjectGenerator.ReturnValue<R>
           
 
Method Summary
 T getRecorder()
          Implementation of T that is used to define the method a generator should be defined for.
<R> ObjectGenerator.ReturnValue<R>
on(R value)
          Define a method a generator should be defined for.
 
Methods inherited from interface net.java.quickcheck.Generator
next
 

Method Detail

getRecorder

T 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


Copyright © 2011. All Rights Reserved.