Class ConfigurationClassPostProcessor

java.lang.Object
com.bobocode.bring.core.bfpp.impl.ConfigurationClassPostProcessor
All Implemented Interfaces:
BeanFactoryPostProcessor

public class ConfigurationClassPostProcessor extends Object implements BeanFactoryPostProcessor
This post processor registers bean definitions in the DefaultBringBeanFactory for beans - methods annotated with Bean annotation. These Beans should be in a Configuration class - a class annotated with @Configuration annotation. The Bean name for a bean defined in a Configuration class is the value taken from the Bean annotation of the method name.
Since:
1.0
Author:
Blyzhnytsia Team
  • Constructor Details

    • ConfigurationClassPostProcessor

      public ConfigurationClassPostProcessor()
  • Method Details

    • postProcessBeanFactory

      public void postProcessBeanFactory(DefaultBringBeanFactory defaultBeanFactory)
      Processes the DefaultBringBeanFactory to populate the bean definitions map with beans defined in Configuration classes.
      Specified by:
      postProcessBeanFactory in interface BeanFactoryPostProcessor
      Parameters:
      defaultBeanFactory - The DefaultBringBeanFactory to be processed.
    • getDeclaredAnnotatedMethods

      private List<Method> getDeclaredAnnotatedMethods(BeanDefinition beanDefinition)
    • loadBeanDefinitionsForBeanMethod

      private void loadBeanDefinitionsForBeanMethod(DefaultBringBeanFactory defaultBeanFactory, String beanName, Method method)
    • resolveBeanName

      private String resolveBeanName(Method method)