Class ClassPathScannerFactory
java.lang.Object
com.bobocode.bring.core.context.scaner.ClassPathScannerFactory
Factory responsible for managing and handling classpath scanning operations for bean processing.
It collaborates with ClassPathScanner and AnnotationResolver implementations for scanning and resolving annotations.
- Since:
- 1.0
- Author:
- Blyzhnytsia Team
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<AnnotationResolver> private final List
<ClassPathScanner> private final List
<Class<? extends Annotation>> -
Constructor Summary
ConstructorsConstructorDescriptionClassPathScannerFactory
(org.reflections.Reflections reflections) Constructs the ClassPathScannerFactory with reflections for initializing scanners and resolvers. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves a set of classes identified as beans to be created by the registered scanners.resolveBeanName
(Class<?> clazz) Resolves the bean name for a given class using registered AnnotationResolvers.
-
Field Details
-
classPathScanners
-
annotationResolvers
-
createdBeanAnnotations
-
-
Constructor Details
-
ClassPathScannerFactory
public ClassPathScannerFactory(org.reflections.Reflections reflections) Constructs the ClassPathScannerFactory with reflections for initializing scanners and resolvers.- Parameters:
reflections
- The Reflections instance used for scanning and resolving annotations.
-
-
Method Details
-
getBeansToCreate
Retrieves a set of classes identified as beans to be created by the registered scanners.- Returns:
- A set of classes to be created based on scanning.
-
resolveBeanName
Resolves the bean name for a given class using registered AnnotationResolvers.- Parameters:
clazz
- The class for which the bean name is to be resolved.- Returns:
- The resolved name of the bean.
-