org.databene.benerator.factory
Class GeneratorFactoryUtil
java.lang.Object
org.databene.benerator.factory.GeneratorFactoryUtil
public class GeneratorFactoryUtil
- extends java.lang.Object
Provides utility methods for Generator factories.
Created: 08.03.2008 09:39:05
- Author:
- Volker Bergmann
|
Method Summary |
static
|
createCyclicHeadGenerator(Generator<T> source)
|
static Generator<java.lang.Long> |
getCountGenerator(InstanceDescriptor descriptor,
boolean resetToMin)
|
static Distribution |
getDistribution(java.lang.String spec,
Uniqueness uniqueness,
boolean required,
BeneratorContext context)
Extracts distribution information from the descriptor. |
static org.databene.commons.Expression<Distribution> |
getDistributionExpression(java.lang.String spec,
Uniqueness uniqueness,
boolean required)
|
static void |
mapDetailsToBeanProperties(FeatureDescriptor descriptor,
java.lang.Object bean,
org.databene.commons.Context context)
|
static void |
mapDetailToBeanProperty(FeatureDescriptor descriptor,
java.lang.String detailName,
java.lang.Object bean,
org.databene.commons.Context context)
|
static void |
setBeanProperty(java.lang.Object bean,
java.lang.String detailName,
java.lang.Object detailValue,
org.databene.commons.Context context)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GeneratorFactoryUtil
public GeneratorFactoryUtil()
mapDetailsToBeanProperties
public static void mapDetailsToBeanProperties(FeatureDescriptor descriptor,
java.lang.Object bean,
org.databene.commons.Context context)
mapDetailToBeanProperty
public static void mapDetailToBeanProperty(FeatureDescriptor descriptor,
java.lang.String detailName,
java.lang.Object bean,
org.databene.commons.Context context)
setBeanProperty
public static void setBeanProperty(java.lang.Object bean,
java.lang.String detailName,
java.lang.Object detailValue,
org.databene.commons.Context context)
getDistribution
public static Distribution getDistribution(java.lang.String spec,
Uniqueness uniqueness,
boolean required,
BeneratorContext context)
- Extracts distribution information from the descriptor.
- Parameters:
spec - the textual representation of the distributionuniqueness - tells if a unique distribution is requestedrequired - if set the method will never return nullcontext - the BeneratorContext
- Returns:
- a distribution that reflects the descriptor setup, null if distribution info is not found nor required.
getDistributionExpression
public static org.databene.commons.Expression<Distribution> getDistributionExpression(java.lang.String spec,
Uniqueness uniqueness,
boolean required)
getCountGenerator
public static Generator<java.lang.Long> getCountGenerator(InstanceDescriptor descriptor,
boolean resetToMin)
createCyclicHeadGenerator
public static <T> Generator<T> createCyclicHeadGenerator(Generator<T> source)
Copyright © 2011. All Rights Reserved.