Class ClassPathScannerFactory

java.lang.Object
com.bobocode.bring.core.context.scaner.ClassPathScannerFactory

public class ClassPathScannerFactory extends Object
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 Details

  • 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

      public Set<Class<?>> 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

      public String resolveBeanName(Class<?> clazz)
      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.