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
Modifier and TypeMethodDescriptionconfigure
(Arbitrary<T> self, ArbitraryConfigurator configurator, TypeUsage targetType) If an arbitrary is self configuring use it, otherwise use default configuratorconfigure
(ArbitraryConfigurator configurator, TypeUsage targetType) Do all configuration yourself or delegate toArbitraryConfigurator.configure(Arbitrary, TypeUsage)
of theconfigurator
that's being handed in.
-
Method Details
-
configure
@API(status=INTERNAL) static <T extends @Nullable Object> Arbitrary<T> configure(Arbitrary<T> self, ArbitraryConfigurator configurator, TypeUsage targetType) If an arbitrary is self configuring use it, otherwise use default configurator -
configure
Do all configuration yourself or delegate toArbitraryConfigurator.configure(Arbitrary, TypeUsage)
of theconfigurator
that'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
-