org.databene.benerator.wrapper
Class NonNullGeneratorProxy<E>
java.lang.Object
org.databene.benerator.util.AbstractGenerator<P>
org.databene.benerator.wrapper.GeneratorWrapper<E,E>
org.databene.benerator.wrapper.GeneratorProxy<E>
org.databene.benerator.wrapper.NonNullGeneratorProxy<E>
- All Implemented Interfaces:
- java.io.Closeable, Generator<E>, NonNullGenerator<E>, org.databene.commons.Resettable, org.databene.commons.ThreadAware
- Direct Known Subclasses:
- BirthDateGenerator, CharacterGenerator, DBSequenceGenerator, EANGenerator, GenderGenerator, LocalSequenceGenerator, LuhnGenerator, RegexStringGenerator, StringGenerator, UniqueIntsGenerator
public abstract class NonNullGeneratorProxy<E>
- extends GeneratorProxy<E>
- implements NonNullGenerator<E>
GeneratorProxy
implementation which implements the NonNullGenerator
interface and
supports its implementors as source Generator
.
Created: 27.07.2011 11:57:17
- Since:
- 0.7.0
- Author:
- Volker Bergmann
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.databene.commons.ThreadAware |
isParallelizable, isThreadSafe |
Methods inherited from interface org.databene.commons.Resettable |
reset |
NonNullGeneratorProxy
public NonNullGeneratorProxy(java.lang.Class<E> generatedType)
NonNullGeneratorProxy
public NonNullGeneratorProxy(NonNullGenerator<E> source)
getSource
public NonNullGenerator<E> getSource()
- Returns the source generator
- Overrides:
getSource
in class GeneratorWrapper<E,E>
setSource
public void setSource(Generator<E> source)
- Sets the source generator
- Overrides:
setSource
in class GeneratorWrapper<E,E>
generateFromNotNullSource
protected final E generateFromNotNullSource()
generate
public final ProductWrapper<E> generate(ProductWrapper<E> wrapper)
- Description copied from interface:
Generator
- Returns an instance of the generic type E, using the
ProductWrapper
instance provided as argument.
The wrapper may wrap a null value as a regular generator product.
If the generator is not available (any more), it returns null instead of
the ProductWrapper instance.
- Specified by:
generate
in interface Generator<E>
- Overrides:
generate
in class GeneratorProxy<E>
generate
public E generate()
- Specified by:
generate
in interface NonNullGenerator<E>
Copyright © 2013. All Rights Reserved.