Package net.jqwik.api.configurators
Class ArbitraryConfiguratorBase
java.lang.Object
net.jqwik.api.configurators.ArbitraryConfiguratorBase
- All Implemented Interfaces:
Comparable<ArbitraryConfigurator>
,ArbitraryConfigurator
@API(status=MAINTAINED,
since="1.0")
public abstract class ArbitraryConfiguratorBase
extends Object
implements ArbitraryConfigurator
Using this base class is the easiest way to make use of the configuration mechanism
described in ArbitraryConfigurator
Implementations must be registered in /META-INF/services/net.jqwik.api.configurators.ArbitraryConfigurator
so that they will be automatically considered for arbitrary configuration.
Some examples that come with jqwik:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
acceptTargetType
(TypeUsage targetType) Override if configurator only works for certain types of domain objects<T> Arbitrary<T>
Configure a givenarbitrary
and return the configured instance.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.jqwik.api.configurators.ArbitraryConfigurator
compareTo, order
-
Constructor Details
-
ArbitraryConfiguratorBase
public ArbitraryConfiguratorBase()
-
-
Method Details
-
configure
Description copied from interface:ArbitraryConfigurator
Configure a givenarbitrary
and return the configured instance.- Specified by:
configure
in interfaceArbitraryConfigurator
- Parameters:
arbitrary
- The arbitrary instance to be configuredtargetType
- The type of the object to be generated by the arbitrary- Returns:
- the newly configured arbitrary instance
-
acceptTargetType
Override if configurator only works for certain types of domain objects- Parameters:
targetType
- The concrete domain type to be generated
-