|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.databene.benerator.util.AbstractGenerator<P>
org.databene.benerator.util.ValidatingGenerator<P>
public abstract class ValidatingGenerator<P>
Provides an abstract implementation of a generator that validates its generated values.
Created: 23.09.2006 00:03:04
Field Summary | |
---|---|
static int |
ERROR_THRESHOLD
The number of invalid consecutive generations that causes an exception |
protected org.databene.commons.Validator<P> |
validator
The validator used for validation |
static int |
WARNING_THRESHOLD
The number of invalid consecutive generations that causes a warning |
Fields inherited from class org.databene.benerator.util.AbstractGenerator |
---|
context, state |
Constructor Summary | |
---|---|
ValidatingGenerator(org.databene.commons.Validator<P> validator)
Constructor that takes the validator |
Method Summary | |
---|---|
protected abstract ProductWrapper<P> |
doGenerate(ProductWrapper<P> wrapper)
Callback method that does the job of creating values. |
ProductWrapper<P> |
generate(ProductWrapper<P> wrapper)
Generator implementation that calls generateImpl() to generate values and validator.validate() in order to validate them. |
Methods inherited from class org.databene.benerator.util.AbstractGenerator |
---|
assertInitialized, assertNotInitialized, close, getResultWrapper, init, reset, toString, wasInitialized |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.databene.benerator.Generator |
---|
getGeneratedType |
Methods inherited from interface org.databene.commons.ThreadAware |
---|
isParallelizable, isThreadSafe |
Field Detail |
---|
public static final int WARNING_THRESHOLD
public static final int ERROR_THRESHOLD
protected org.databene.commons.Validator<P> validator
Constructor Detail |
---|
public ValidatingGenerator(org.databene.commons.Validator<P> validator)
Method Detail |
---|
public ProductWrapper<P> generate(ProductWrapper<P> wrapper)
protected abstract ProductWrapper<P> doGenerate(ProductWrapper<P> wrapper)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |