Package net.jqwik.api.domains
Class DomainContextBase
- java.lang.Object
-
- net.jqwik.api.domains.DomainContextBase
-
- All Implemented Interfaces:
DomainContext
@API(status=EXPERIMENTAL, since="1.5.2") public abstract class DomainContextBase extends java.lang.Object implements DomainContext
Base class for convention based implementations of DomainContextIn subclasses you can:
-
Add methods annotated with Provide and a return type of Arbitrary<T>.
The result of an annotated method will then be used as an arbitrary provider for type
T
.
Those methods follow the same rules as provider methods in container classes, i.e. they have optional parameters of type TypeUsage, of type ArbitraryProvider.SubtypeProvider or with annotation ForAll. - Add inner classes (static or not static, but not private) that implement ArbitraryProvider. An instance of this class will then be used as providers.
- Add inner classes (static or not static, but not private) that implement ArbitraryConfigurator. An instance of this class will then be used as configurator.
- See Also:
DomainContext
,Provide
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.jqwik.api.domains.DomainContext
DomainContext.DomainContextFacade, DomainContext.Global
-
-
Constructor Summary
Constructors Constructor Description DomainContextBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<ArbitraryConfigurator>
getArbitraryConfigurators()
java.util.List<ArbitraryProvider>
getArbitraryProviders()
void
setDefaultPriority(int priority)
-
-
-
Method Detail
-
getArbitraryProviders
public java.util.List<ArbitraryProvider> getArbitraryProviders()
- Specified by:
getArbitraryProviders
in interfaceDomainContext
-
getArbitraryConfigurators
public java.util.List<ArbitraryConfigurator> getArbitraryConfigurators()
- Specified by:
getArbitraryConfigurators
in interfaceDomainContext
-
setDefaultPriority
public void setDefaultPriority(int priority)
- Specified by:
setDefaultPriority
in interfaceDomainContext
-
-