Package net.jqwik.api.configurators
Interface SelfConfiguringArbitrary<T>
-
@API(status=MAINTAINED, since="1.0") public interface SelfConfiguringArbitrary<T>An Arbitrary implementation can also implement this interface if it wants to take over its own configuration which is usually being done by registered instances of ArbitraryConfigurator.There are a few implementors within jqwik's own codebase:
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <T> Arbitrary<T>configure(Arbitrary<T> self, ArbitraryConfigurator configurator, TypeUsage targetType)If an arbitrary is self configuring use it, otherwise use default configuratorArbitrary<T>configure(ArbitraryConfigurator configurator, TypeUsage targetType)Do all configuration yourself or delegate toArbitraryConfigurator.configure(Arbitrary, TypeUsage)of theconfiguratorthat's being handed in.
-
-
-
Method Detail
-
configure
@API(status=INTERNAL) static <T> Arbitrary<T> configure(Arbitrary<T> self, ArbitraryConfigurator configurator, TypeUsage targetType)
If an arbitrary is self configuring use it, otherwise use default configurator
-
configure
Arbitrary<T> configure(ArbitraryConfigurator configurator, TypeUsage targetType)
Do all configuration yourself or delegate toArbitraryConfigurator.configure(Arbitrary, TypeUsage)of theconfiguratorthat's being handed in.- Parameters:
configurator- the configurator to usetargetType- the target type of the arbitrary- Returns:
- the arbitrary instance or a new derived one
-
-