Package net.jqwik.api

Annotationsschnittstelle Provide


@Target({ANNOTATION_TYPE,METHOD}) @Retention(RUNTIME) @Documented @API(status=STABLE, since="1.0") public @interface Provide
Used to annotate methods that can provide values for property method parameters. Those methods must return an instance of Arbitrary.

Methods annotated with Provide can be present:

  • In test container classes to be picked up by ForAll parameters.
  • In subclasses of DomainContextBase where those methods will be used to serve as arbitrary providers for a DomainContext.

Those methods can have optional parameters of type TypeUsage or with annotation ForAll. The latter will be used to flatMap over them.

Siehe auch:
  • Optionale Elemente - Übersicht

    Optionale Elemente
    Modifizierer und Typ
    Optionales Element
    Beschreibung
    Class<? extends Throwable>[]
    Used to specify exception types that should be ignored during value generation.
    Used as reference name.
  • Elementdetails

    • value

      String value
      Used as reference name. If it is not specified, the method's name is used instead.
      Gibt zurück:
      A non-empty string if the method should not be referenced by its name
      Standard:
      ""
    • ignoreExceptions

      @API(status=MAINTAINED, since="1.8.0") Class<? extends Throwable>[] ignoreExceptions
      Used to specify exception types that should be ignored during value generation.
      Gibt zurück:
      an array of exception types
      Standard:
      {}