Schnittstelle TypeArbitrary<T extends @Nullable Object>

Alle Superschnittstellen:
Arbitrary<T>

@API(status=MAINTAINED, since="1.2") public interface TypeArbitrary<T extends @Nullable Object> extends Arbitrary<T>
Fluent interface to configure arbitraries that try to generate instances of a given type T from the type's available constructors and factory methods.

When constructors and factory methods have parameters those parameters will be resolved by searching for matching registered arbitrary providers. The searching is performed either globally or in the property method's specified domain contexts.

Siehe auch:
  • Methodendetails

    • usePublicConstructors

      TypeArbitrary<T> usePublicConstructors()
      Add public constructors of class T to be used for generating values of type T
      Gibt zurück:
      new arbitrary instance
    • useAllConstructors

      TypeArbitrary<T> useAllConstructors()
      Add all constructors (public, private or package scope) of class T to be used for generating values of type T
      Gibt zurück:
      new arbitrary instance
    • useConstructors

      TypeArbitrary<T> useConstructors(Predicate<? super Constructor<?>> filter)
      Add all constructors (public, private or package scope) of class T to be used for generating values of type T
      Parameter:
      filter - Predicate to add only those constructors for which the predicate returns true
      Gibt zurück:
      new arbitrary instance
    • usePublicFactoryMethods

      TypeArbitrary<T> usePublicFactoryMethods()
      Add public factory methods (static methods with return type T) of class T to be used for generating values of type T
      Gibt zurück:
      new arbitrary instance
    • useAllFactoryMethods

      TypeArbitrary<T> useAllFactoryMethods()
      Add all factory methods (static methods with return type T) of class T to be used for generating values of type T
      Gibt zurück:
      new arbitrary instance
    • useFactoryMethods

      TypeArbitrary<T> useFactoryMethods(Predicate<? super Method> filter)
      Add all factory methods (static methods with return type T) of class T to be used for generating values of type T
      Parameter:
      filter - Predicate to add only those factory methods for which the predicate returns true
      Gibt zurück:
      new arbitrary instance
    • enableRecursion

      @API(status=MAINTAINED, since="1.8.0") TypeArbitrary<T> enableRecursion()
      Enable recursive use of type arbitrary: If any parameter of a creator function does not have an associated arbitrary (globally registered or through a domain context), jqwik will try to resolve this parameter using its type information as weill.
      Gibt zurück:
      new arbitrary instance