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<T> g; Generator<R> methodGenerator; g.on(g.getRecorder().method()).returns(methodGenerator);
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceObjectGenerator.ReturnValue<R>
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TgetRecorder()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.
-
-
-
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.ReturnValueinstance to define a generator for this method
-
-