Interface BeanOverrideProcessor

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface BeanOverrideProcessor
Strategy interface for Bean Override processing, providing OverrideMetadata that drives how the target bean is overridden.

At least one composed annotation that is meta-annotated with @BeanOverride must be a companion of this processor and may provide additional user settings that drive how the concrete OverrideMetadata is configured.

Implementations are required to have a no-argument constructor and be stateless.

Since:
6.2
Author:
Simon Baslé, Stephane Nicoll
  • Method Details

    • createMetadata

      OverrideMetadata createMetadata(Annotation overrideAnnotation, Class<?> testClass, Field field)
      Create an OverrideMetadata instance for the given annotated field.
      Parameters:
      overrideAnnotation - the composed annotation that defines the @BeanOverride that triggers this processor
      testClass - the test class being processed
      field - the annotated field
      Returns:
      the OverrideMetadata instance that should handle the given field