Package net.jqwik.api.domains
Interface DomainContext
- All Known Implementing Classes:
DomainContext.Global
,DomainContextBase
@API(status=MAINTAINED,
since="1.2.0")
public interface DomainContext
Class that implement this interface are used to annotate property methods or containers like this:
Domain(MyDomainContext.class)
. They must have a constructor without parameters
to be usable in this way.
Lifecycle: Instantiate exactly once per property, then initialize(PropertyLifecycleContext) will be called before providers and configurators will be retrieved.
Most implementing class will subclass DomainContextBase.
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
static class
-
Method Summary
Modifier and TypeMethodDescriptiondefault Collection<SampleReportingFormat>
Provide additional reporting formats that are used to format objects that are reported in property results or when using a Reporter.static DomainContext
global()
default void
initialize
(PropertyLifecycleContext context) This method will be called exactly once after instantiation of a given domain context class.default void
setDefaultPriority
(int priority)
-
Method Details
-
global
-
setDefaultPriority
default void setDefaultPriority(int priority) -
getArbitraryProviders
Collection<ArbitraryProvider> getArbitraryProviders() -
getArbitraryConfigurators
Collection<ArbitraryConfigurator> getArbitraryConfigurators() -
getReportingFormats
@API(status=EXPERIMENTAL, since="1.6.4") default Collection<SampleReportingFormat> getReportingFormats()Provide additional reporting formats that are used to format objects that are reported in property results or when using a Reporter.- Returns:
- Collection of SampleReportingFormat instances
-
initialize
This method will be called exactly once after instantiation of a given domain context class. The call will happen before any calls to getArbitraryProviders() and getArbitraryConfigurators().Override this message if your domain context needs access to the context of a property.
-