Interface CamelBeanPostProcessorInjector


public interface CamelBeanPostProcessorInjector
Pluggable injector that participates in CamelBeanPostProcessor bean post-processing to support custom, typically 3rd-party, dependency-injection annotations.

When the CamelBeanPostProcessor scans a bean it invokes every registered injector for each field (onFieldInject(Field, Object, String)) and method (onMethodInject(Method, Object, String)), allowing the injector to detect its own annotations and inject the appropriate values. This is how integrations layer support for annotations beyond the built-in Camel ones (for example Spring or Quarkus annotations) on top of the standard post processor. Injectors are registered through CamelBeanPostProcessor.addCamelBeanPostProjectInjector(CamelBeanPostProcessorInjector).

See Bean Injection in the Camel user manual.

Since:
3.16
See Also:
  • Method Details

    • onFieldInject

      void onFieldInject(Field field, Object bean, @Nullable String beanName)
      Field injection
      Parameters:
      field - the field
      bean - the bean instance where the field is present
      beanName - optional bean id of the bean
    • onMethodInject

      void onMethodInject(Method method, Object bean, @Nullable String beanName)
      Method injection
      Parameters:
      method - the method
      bean - the bean instance where the method is present
      beanName - optional bean id of the bean