Package | Description |
---|---|
com.pholser.junit.quickcheck.generator |
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<?> |
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)
Gives a generator that can produce values of the given type.
|
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) |
© Copyright 2010-2016 Paul R. Holser, Jr. All rights reserved. Licensed under The MIT License. pholser@alumni.rice.edu