Package net.jqwik.api.configurators
Interface ArbitraryConfigurator
- All Superinterfaces:
Comparable<ArbitraryConfigurator>
- All Known Implementing Classes:
ArbitraryConfiguratorBase
@API(status=MAINTAINED,
since="1.0")
public interface ArbitraryConfigurator
extends Comparable<ArbitraryConfigurator>
Implementors can modify any arbitrary before it's being used for value generation.
Most implementations use ArbitraryConfiguratorBase to derive from
Implementations must be registered in /META-INF/services/net.jqwik.api.configurators.ArbitraryConfigurator
so that they will be automatically considered for arbitrary configuration.
-
Method Summary
Modifier and TypeMethodDescriptiondefault int
compareTo
(ArbitraryConfigurator other) Configure a givenarbitrary
and return the configured instance.default int
order()
Determines the order in which a configurator will be applied in regards to other configurators.
-
Method Details
-
configure
Configure a givenarbitrary
and return the configured instance.- 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
-
order
default int order()Determines the order in which a configurator will be applied in regards to other configurators. Default value is100
. Use lower values to enforce earlier application and higher values for later application.- Returns:
- the order
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ArbitraryConfigurator>
-