Klasse ArbitraryConfiguratorBase

java.lang.Object
net.jqwik.api.configurators.ArbitraryConfiguratorBase
Alle implementierten Schnittstellen:
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:

  • Konstruktordetails

    • ArbitraryConfiguratorBase

      public ArbitraryConfiguratorBase()
  • Methodendetails

    • configure

      public <T extends @Nullable Object> Arbitrary<T> configure(Arbitrary<T> arbitrary, TypeUsage targetType)
      Beschreibung aus Schnittstelle kopiert: ArbitraryConfigurator
      Configure a given arbitrary and return the configured instance.
      Angegeben von:
      configure in Schnittstelle ArbitraryConfigurator
      Parameter:
      arbitrary - The arbitrary instance to be configured
      targetType - The type of the object to be generated by the arbitrary
      Gibt zurück:
      the newly configured arbitrary instance
    • acceptTargetType

      protected boolean acceptTargetType(TypeUsage targetType)
      Override if configurator only works for certain types of domain objects
      Parameter:
      targetType - The concrete domain type to be generated