Interface GeneratorSpecProcessor

All Known Implementing Classes:
BeanValidationProcessor, NoopBeanValidationProvider

@InternalApi public interface GeneratorSpecProcessor
Processes generator specs prior to generating a value, for example, in order to customise spec parameters.
Since:
2.7.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    process(@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 targetClass parameter may differ from Field.getType(). This could be the case where the field is declared using a TypeVariable, in which case field's type will be Object. Alternatively, a subtype may have been specified via the API.

      Parameters:
      spec - generator spec to process
      targetClass - class being generated
      field - field the generated value will be assigned to
      Since:
      2.7.0