Package net.jqwik.api
Schnittstelle ArbitrarySupplier<T extends @Nullable Object>
- Alle bekannten Implementierungsklassen:
ArbitrarySupplier.NONE
@API(status=MAINTAINED,
since="1.7.0")
public interface ArbitrarySupplier<T extends @Nullable Object>
extends Supplier<Arbitrary<T>>
Implementations of this class are used to provide single arbitraries for
ForAll parameters and parameter types annotated with From.
Use ForAll.supplier() or From.supplier() attributes to specify
the actual implementation class.
Either supplyFor(TypeUsage) or get() must be overridden.
But not both.
- Siehe auch:
-
Verschachtelte Klassen - Übersicht
Verschachtelte Klassen -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungget()Override this method if generating the arbitrary is straightforward.Override this method if you need more information about the target type, e.g. annotations or type parameters.
-
Methodendetails
-
supplyFor
Override this method if you need more information about the target type, e.g. annotations or type parameters.This method takes precedence if both
supplyFor(TypeUsage)andget()are overridden.- Parameter:
targetType- Specifies the type to generate.- Gibt zurück:
- A new arbitrary instance
-
get
Override this method if generating the arbitrary is straightforward. This is probably the standard usage.Mind that
supplyFor(TypeUsage)takes precedence if bothsupplyFor(TypeUsage)andget()are overridden.
-