Class ConfigurationClassPostProcessor
java.lang.Object
com.bobocode.bring.core.bfpp.impl.ConfigurationClassPostProcessor
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDeclaredAnnotatedMethods(BeanDefinition beanDefinition) private voidloadBeanDefinitionsForBeanMethod(DefaultBringBeanFactory defaultBeanFactory, String beanName, Method method) voidpostProcessBeanFactory(DefaultBringBeanFactory defaultBeanFactory) Processes the DefaultBringBeanFactory to populate the bean definitions map with beans defined in Configuration classes.private StringresolveBeanName(Method method)
-
Constructor Details
-
ConfigurationClassPostProcessor
public ConfigurationClassPostProcessor()
-
-
Method Details
-
postProcessBeanFactory
Processes the DefaultBringBeanFactory to populate the bean definitions map with beans defined in Configuration classes.- Specified by:
postProcessBeanFactoryin interfaceBeanFactoryPostProcessor- Parameters:
defaultBeanFactory- The DefaultBringBeanFactory to be processed.
-
getDeclaredAnnotatedMethods
-
loadBeanDefinitionsForBeanMethod
private void loadBeanDefinitionsForBeanMethod(DefaultBringBeanFactory defaultBeanFactory, String beanName, Method method) -
resolveBeanName
-