Package net.jqwik.api.configurators
Class ArbitraryConfiguratorBase
- java.lang.Object
 - 
- net.jqwik.api.configurators.ArbitraryConfiguratorBase
 
 
- 
- All Implemented Interfaces:
 java.lang.Comparable<ArbitraryConfigurator>,ArbitraryConfigurator
@API(status=MAINTAINED, since="1.0") public abstract class ArbitraryConfiguratorBase extends java.lang.Object implements ArbitraryConfiguratorUsing this base class is the easiest way to make use of the configuration mechanism described in ArbitraryConfiguratorImplementations must be registered in
/META-INF/services/net.jqwik.api.configurators.ArbitraryConfiguratorso that they will be automatically considered for arbitrary configuration.Some examples that come with jqwik:
 
- 
- 
Constructor Summary
Constructors Constructor Description ArbitraryConfiguratorBase() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanacceptTargetType(TypeUsage targetType)Override if configurator only works for certain types of domain objects<T> Arbitrary<T>configure(Arbitrary<T> arbitrary, TypeUsage targetType)Configure a givenarbitraryand 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 
 - 
 
 - 
 
- 
- 
Method Detail
- 
configure
public <T> Arbitrary<T> configure(Arbitrary<T> arbitrary, TypeUsage targetType)
Description copied from interface:ArbitraryConfiguratorConfigure a givenarbitraryand return the configured instance.- Specified by:
 configurein 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
protected boolean acceptTargetType(TypeUsage targetType)
Override if configurator only works for certain types of domain objects- Parameters:
 targetType- The concrete domain type to be generated
 
 - 
 
 -