org.databene.benerator.util
Class GeneratorUtil
java.lang.Object
org.databene.benerator.util.GeneratorUtil
public class GeneratorUtil
- extends java.lang.Object
Provides utility methods for data generation.
Created: 19.11.2007 15:27:50
- Author:
- Volker Bergmann
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GeneratorUtil
public GeneratorUtil()
init
public static void init(Generator<?> generator)
init
public static void init(Generator<?> generator,
GeneratorContext context)
close
public static void close(Generator<?> generator)
generateNullable
public static <T> T generateNullable(Generator<T> generator)
- Calls a
Generator
's Generator.generate(ProductWrapper)
method and returns its unwrapped result,
allowing null values as generation results, but requiring the generator to be available.
generateNonNull
public static <T> T generateNonNull(Generator<T> generator)
- Calls a
Generator
's Generator.generate(ProductWrapper)
method and returns its unwrapped result,
signaling generator unavailability with a null
value and requiring the Generator
not to create null
values as result.
getWrapper
protected static <T> ProductWrapper<T> getWrapper()
allProducts
public static <T> java.util.List<T> allProducts(Generator<T> generator)
commonTargetTypeOf
public static <T> java.lang.Class<T> commonTargetTypeOf(Generator<T>... sources)
initAll
public static void initAll(Generator<?>[] generators,
GeneratorContext context)
resetAll
public static void resetAll(org.databene.commons.Resettable[] resettables)
unwrap
public static Generator<?> unwrap(Generator<?> generator)
Copyright © 2013. All Rights Reserved.