org.databene.benerator.wrapper
Class ConvertingGenerator<S,T>
java.lang.Object
org.databene.benerator.util.AbstractGenerator<P>
org.databene.benerator.wrapper.GeneratorWrapper<S,T>
org.databene.benerator.wrapper.ConvertingGenerator<S,T>
- All Implemented Interfaces:
- java.io.Closeable, Generator<T>, org.databene.commons.Resettable, org.databene.commons.ThreadAware
public class ConvertingGenerator<S,T>
- extends GeneratorWrapper<S,T>
Reads products from a source Generator and applies a Converter to transform them into the target products.
Created: 12.06.2006 19:02:30
- Author:
- Volker Bergmann
|
Field Summary |
protected org.databene.commons.Converter<?,?>[] |
converters
The converter to apply to the source's products |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
converters
protected org.databene.commons.Converter<?,?>[] converters
- The converter to apply to the source's products
ConvertingGenerator
public ConvertingGenerator(Generator<S> source,
org.databene.commons.Converter<?,?>... converters)
- Initializes all attributes
init
public void init(GeneratorContext context)
- Specified by:
init in interface Generator<T>- Overrides:
init in class GeneratorWrapper<S,T>
getGeneratedType
public java.lang.Class<T> getGeneratedType()
- Description copied from interface:
Generator
- Declares the type of the objects returned by the generate() method.
generate
public T generate()
- Description copied from interface:
Generator
- Returns an instance of the generic type E.
- See Also:
Generator.generate()
Copyright © 2011. All Rights Reserved.