org.jwalk.gen
Interface CustomGenerator

All Superinterfaces:
Generator
All Known Implementing Classes:
EnumGenerator, InterfaceGenerator, PlatformGenerator, RedirectInGenerator, StringGenerator

public interface CustomGenerator
extends Generator

CustomGenerator is the interface implemented by custom generators. A CustomGenerator is a kind of generator that synthesises test values of certain types in a particular way, controlled by the tester. This is the main extension mechanism for JWalk. A custom generator must have a default constructor, and implement the three methods:

See the Generator interface documentation for more details about how generators are expected to synthesise their test inputs.

Version:
1.0
Author:
Anthony Simons

Method Summary
 void setOwner(MasterGenerator generator)
          Registers a MasterGenerator as the owner of this CustomGenerator.
 
Methods inherited from interface org.jwalk.Generator
canCreate, nextValue
 

Method Detail

setOwner

void setOwner(MasterGenerator generator)
Registers a MasterGenerator as the owner of this CustomGenerator. This method is automatically called when this CustomGenerator is added as a delegate of a MasterGenerator. It is provided so that a CustomGenerator may have access to its owner, and, if so desired, invoke nextValue() recursively to generate components of the values produced by this CustomGenerator. Implementors may provide a null implementation, if no communication is desired with the owner.