org.databene.benerator.nullable
Class NullInjectingGeneratorProxy<E>
java.lang.Object
org.databene.benerator.nullable.AbstractNullableGenerator<P>
org.databene.benerator.nullable.NullableGeneratorWrapper<E,E>
org.databene.benerator.nullable.NullInjectingGeneratorProxy<E>
- All Implemented Interfaces:
- java.io.Closeable, NullableGenerator<E>, org.databene.commons.Resettable, org.databene.commons.ThreadAware
public class NullInjectingGeneratorProxy<E>
- extends NullableGeneratorWrapper<E,E>
Proxy implementation of the NullableGenerator interface.
Created: 26.01.2010 10:32:58
- Since:
- 0.6.0
- Author:
- Volker Bergmann
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NullInjectingGeneratorProxy
public NullInjectingGeneratorProxy(NullableGenerator<E> source,
double nullQuota)
getGeneratedType
public java.lang.Class<E> getGeneratedType()
init
public void init(GeneratorContext context)
throws InvalidGeneratorSetupException
- Specified by:
init in interface NullableGenerator<E>- Overrides:
init in class NullableGeneratorWrapper<E,E>
- Throws:
InvalidGeneratorSetupException
generate
public ProductWrapper<E> generate(ProductWrapper<E> wrapper)
- First checks if a null value should be returned, if so it returns a wrapper that wraps a null value,
otherwise a wrapper that wraps a value generated by the underlying source generator. If that generator
is not available any more,
null is returned.
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Copyright © 2011. All Rights Reserved.