Interface BuilderInterceptor<T>

Type Parameters:
T - the type of the bean builder to intercept
All Known Implementing Classes:
ActivationLogEntry.Interceptor
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 BuilderInterceptor<T>
Provides a contract by which the Builder-annotated builder type can be intercepted (i.e., including decoration or mutation).

This type is used when Builder.requireLibraryDependencies() is used. When it is turned off, however, an equivalent type will be code-generated into each generated bean. Note also that in this situation your interceptor implementation does not need to implement this interface contract, but instead must adhere to the following:

  • The implementation class type must provide a no-arg accessible constructor available to the generated class, unless the Builder.interceptorCreateMethod() is used.
  • The implementation class type must provide a method-compatible (lambda) signature to the intercept(T) method.
  • Any exceptions that might be thrown from the intercept(T) method must be an unchecked exception type.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    intercept(T target)
    Provides the ability to intercept (i.e., including decoration or mutation) the target.
  • Method Details

    • intercept

      T intercept(T target)
      Provides the ability to intercept (i.e., including decoration or mutation) the target.
      Parameters:
      target - the target being intercepted
      Returns:
      the mutated or replaced target (must not be null)