public abstract class GeneratorContext<Context extends GeneratorContext<Context>> extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
GeneratorContext(GeneratorBase base) |
| Modifier and Type | Method and Description |
|---|---|
<T> Generator<Context,T> |
generatorFor(PDeclaredDescriptor<T> descriptor)
Get the default generator for the given type.
|
<T> Generator<Context,T> |
generatorFor(PDescriptor descriptor)
Get the default generator for the given type.
|
double |
getDefaultFillRate() |
int |
getDefaultMaxCollectionSize() |
io.codearte.jfairy.Fairy |
getFairy() |
Random |
getRandom() |
int |
nextDefaultCollectionSize()
Convenience method to get the next collection size based on the default
max collection size.
|
protected GeneratorContext(GeneratorBase base)
@Nonnull public io.codearte.jfairy.Fairy getFairy()
public int getDefaultMaxCollectionSize()
public double getDefaultFillRate()
public <T> Generator<Context,T> generatorFor(@Nonnull PDeclaredDescriptor<T> descriptor)
T - The instance type.descriptor - The type descriptor.public <T> Generator<Context,T> generatorFor(@Nonnull PDescriptor descriptor)
T - The instance type.descriptor - The type descriptor.public int nextDefaultCollectionSize()
Copyright © 2015–2019 morimekta.net. All rights reserved.