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, which creates a BeanOverrideHandler 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 optionally provide annotation attributes that can be used to configure the BeanOverrideHandler.

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

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

    • createHandler

      BeanOverrideHandler createHandler(Annotation overrideAnnotation, Class<?> testClass, Field field)
      Create a BeanOverrideHandler for the given annotated field.
      Parameters:
      overrideAnnotation - the composed annotation that declares the @BeanOverride annotation which registers this processor
      testClass - the test class to process
      field - the annotated field
      Returns:
      the BeanOverrideHandler that should handle the given field