org.databene.benerator.util
Class ExpressionBasedGenerator<E>
java.lang.Object
org.databene.benerator.util.AbstractGenerator<E>
org.databene.benerator.util.ThreadSafeGenerator<E>
org.databene.benerator.util.ExpressionBasedGenerator<E>
- All Implemented Interfaces:
- java.io.Closeable, Generator<E>, org.databene.commons.Resettable, org.databene.commons.ThreadAware
public class ExpressionBasedGenerator<E>
- extends ThreadSafeGenerator<E>
Evaluates an Expression
on each call to generate(ProductWrapper)
and returns its results.
Created: 27.03.2010 19:51:46
- Since:
- 0.6.0
- Author:
- Volker Bergmann
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ExpressionBasedGenerator
public ExpressionBasedGenerator(org.databene.script.Expression<E> expression,
java.lang.Class<E> generatedType)
generate
public 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.
getGeneratedType
public java.lang.Class<E> getGeneratedType()
- Description copied from interface:
Generator
- Declares the type of the objects returned by the generate() method.
toString
public java.lang.String toString()
- Overrides:
toString
in class AbstractGenerator<E>
Copyright © 2013. All Rights Reserved.