public static interface TraverseArbitrary.Traverser
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<java.lang.reflect.Executable> |
findCreators(TypeUsage targetType)
Return all creators (constructors or static factory methods) for a type to traverse.
|
default java.util.Optional<Arbitrary<java.lang.Object>> |
resolveParameter(TypeUsage parameterType)
Create an arbitrary for a creator parameter.
|
default java.util.Optional<Arbitrary<java.lang.Object>> resolveParameter(TypeUsage parameterType)
parameterType - The typeUsage of the parameter, including annotationsOptional.empty()java.util.Set<java.lang.reflect.Executable> findCreators(TypeUsage targetType)
If you return an empty set, the attempt to generate a type will be stopped by throwing an exception.
targetType - The target type for which to find creators (factory methods or constructors)