| Modifier and Type | Class and Description |
|---|---|
class |
ComponentizedGenerator<T>
Produces values for property parameters of types that have parameterizations
that would also need generation, such as collections, maps, and predicates.
|
class |
Ctor<T>
Produces instances of a class by generating values for the parameters of
one of the constructors on the class, and invoking the constructor.
|
class |
Fields<T>
Produces instances of a class by reflecting the class's fields and
generating random values for them.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends Generator<?>> |
Generators.make(Class<T> genType,
Generator<?>... componentGenerators)
Makes a new generator of the given type, provides it with access to
other available generators,
configures it with any configuration annotations present on the
generator type, and supplies it any
component generators it needs.
|
| Modifier and Type | Method and Description |
|---|---|
<T> Generator<T> |
Generators.constructor(Class<T> type,
Class<?>... argumentTypes)
Gives a generator that can produce an instance of the type described
by a constructor of a given type that accepts the given types of
arguments.
|
Generator<T> |
Generator.copy()
Used by the framework to make a copy of the receiver.
|
Generator<T> |
Fields.copy() |
Generator<?> |
Generators.field(Class<?> type,
String fieldName)
Gives a generator that can produce an instance of the type described
by the field with the given name and containing type.
|
Generator<?> |
Generators.field(Field field)
Gives a generator that can produce instances of the type of the
given reflected field.
|
<T> Generator<T> |
Generators.fieldsOf(Class<T> type)
Gives a generator that can produce an instance of the given type
by reflecting the class's fields on up its class hierarchy and
generating random values for them.
|
<T> Generator<T> |
Generators.oneOf(Class<? extends T> first,
Class<? extends T>... rest)
Gives a generator that can produce instances of one of a given set of
related types on every generation.
|
<T> Generator<T> |
Generators.oneOf(Generator<? extends T> first,
Generator<? extends T>... rest)
Gives a generator that can produce instances of one of a given set of
related types on every generation.
|
Generator<?> |
Generators.parameter(Parameter parameter)
Gives a generator that can produce instances of the type of the
given reflected method parameter.
|
<T> Generator<T> |
Generators.type(Class<T> type,
Class<?>... componentTypes)
Gives a generator that can produce values of the given type,
parameterized by the given "component" types.
|
| Modifier and Type | Method and Description |
|---|---|
protected List<Generator<?>> |
ComponentizedGenerator.componentGenerators() |
| Modifier and Type | Method and Description |
|---|---|
<T extends Generator<?>> |
Generators.make(Class<T> genType,
Generator<?>... componentGenerators)
Makes a new generator of the given type, provides it with access to
other available generators,
configures it with any configuration annotations present on the
generator type, and supplies it any
component generators it needs.
|
static <T,U> T |
Lambdas.makeLambda(Class<T> lambdaType,
Generator<U> returnValueGenerator,
GenerationStatus status)
Creates an instance of a given "functional interface" type, whose
single abstract method returns values of the type produced by the given
generator.
|
<T> Generator<T> |
Generators.oneOf(Generator<? extends T> first,
Generator<? extends T>... rest)
Gives a generator that can produce instances of one of a given set of
related types on every generation.
|
<T> Generator<T> |
Generators.oneOf(Generator<? extends T> first,
Generator<? extends T>... rest)
Gives a generator that can produce instances of one of a given set of
related types on every generation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Generator.addComponentGenerators(List<Generator<?>> newComponents)
Adds component generators to this generator.
|
void |
ComponentizedGenerator.addComponentGenerators(List<Generator<?>> newComponents) |
| Modifier and Type | Method and Description |
|---|---|
default Generator<?> |
ParameterSampler.decideGenerator(GeneratorRepository repository,
ParameterTypeContext p) |
| Modifier and Type | Method and Description |
|---|---|
List<Weighted<Generator<?>>> |
ParameterTypeContext.explicitGenerators() |
| Modifier and Type | Class and Description |
|---|---|
class |
ArrayGenerator |
class |
CompositeGenerator |
class |
EnumGenerator |
class |
ExhaustiveDomainGenerator |
class |
GuaranteeValuesGenerator |
class |
LambdaGenerator<T,U> |
class |
SamplingDomainGenerator |
class |
ZilchGenerator |
| Modifier and Type | Method and Description |
|---|---|
<T extends Generator<?>> |
GeneratorRepository.make(Class<T> genType,
Generator<?>... components) |
| Modifier and Type | Method and Description |
|---|---|
Generator<?> |
CompositeGenerator.composed(int index) |
<U> Generator<U> |
GeneratorRepository.constructor(Class<U> type,
Class<?>... argumentTypes) |
Generator<?> |
GeneratorRepository.field(Class<?> type,
String fieldName) |
Generator<?> |
GeneratorRepository.field(Field field) |
<U> Generator<U> |
GeneratorRepository.fieldsOf(Class<U> type) |
Generator<?> |
GeneratorRepository.generatorFor(ParameterTypeContext parameter) |
<T> Generator<T> |
GeneratorRepository.oneOf(Class<? extends T> first,
Class<? extends T>... rest) |
<T> Generator<T> |
GeneratorRepository.oneOf(Generator<? extends T> first,
Generator<? extends T>... rest) |
Generator<?> |
GeneratorRepository.parameter(Parameter parameter) |
Generator<?> |
GeneratorRepository.produceGenerator(ParameterTypeContext parameter) |
<T> Generator<T> |
GeneratorRepository.type(Class<T> type,
Class<?>... componentTypes) |
| Modifier and Type | Method and Description |
|---|---|
Iterator<Generator<?>> |
ServiceLoaderGeneratorSource.iterator() |
| Modifier and Type | Method and Description |
|---|---|
<T extends Generator<?>> |
GeneratorRepository.make(Class<T> genType,
Generator<?>... components) |
<T> Generator<T> |
GeneratorRepository.oneOf(Generator<? extends T> first,
Generator<? extends T>... rest) |
<T> Generator<T> |
GeneratorRepository.oneOf(Generator<? extends T> first,
Generator<? extends T>... rest) |
GeneratorRepository |
GeneratorRepository.register(Generator<?> source) |
| Modifier and Type | Method and Description |
|---|---|
GeneratorRepository |
GeneratorRepository.register(Iterable<Generator<?>> source) |
| Constructor and Description |
|---|
GuaranteeValuesGenerator(ExhaustiveDomainGenerator guaranteed,
Generator<?> rest) |
LambdaGenerator(Class<T> lambdaType,
Generator<U> returnValueGenerator) |
| Constructor and Description |
|---|
CompositeGenerator(List<Weighted<Generator<?>>> composed) |
| Modifier and Type | Method and Description |
|---|---|
Generator<?> |
TupleParameterSampler.decideGenerator(GeneratorRepository repository,
ParameterTypeContext p) |
Generator<?> |
ExhaustiveParameterSampler.decideGenerator(GeneratorRepository repository,
ParameterTypeContext p) |
Copyright © 2019. All rights reserved.