Package org.instancio.internal
Interface GeneratorSpecProcessor
- All Known Implementing Classes:
BeanValidationProcessor,NoopBeanValidationProvider
Processes generator specs prior to generating a value,
for example, in order to customise spec parameters.
- Since:
- 2.7.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidprocess(@NotNull GeneratorSpec<?> spec, @NotNull Class<?> targetClass, @Nullable Field field) Processes given generator spec.
-
Method Details
-
process
void process(@NotNull @NotNull GeneratorSpec<?> spec, @NotNull @NotNull Class<?> targetClass, @Nullable @Nullable Field field) Processes given generator spec.The
targetClassparameter may differ fromField.getType(). This could be the case where the field is declared using aTypeVariable, in which case field's type will beObject. Alternatively, a subtype may have been specified via the API.- Parameters:
spec- generator spec to processtargetClass- class being generatedfield- field the generated value will be assigned to- Since:
- 2.7.0
-