/** * Create AnnotatedTypes from the ClassPath via the ScannerService */ private Map<BeanArchiveInformation, List<AnnotatedType<?>>> annotatedTypesFromClassPath(ScannerService scanner) { logger.fine("Creating AnnotatedTypes from class files has started."); Set<Class<?>> foundClasses = new HashSet<>(100); Map<BeanArchiveInformation, List<AnnotatedType<?>>> annotatedTypesPerBda = new HashMap<>(); if (scanner instanceof BdaScannerService) { Map<BeanArchiveInformation, Set<Class<?>>> beanClassesPerBda = ((BdaScannerService) scanner).getBeanClassesPerBda(); for (Map.Entry<BeanArchiveInformation, Set<Class<?>>> bdaEntry : beanClassesPerBda.entrySet()) { List<AnnotatedType<?>> annotatedTypes = annotatedTypesFromBdaClassPath(bdaEntry.getValue(), foundClasses); annotatedTypesPerBda.put(bdaEntry.getKey(), annotatedTypes); } // also add the rest of the class es to the default bda // we also need this initialised in case annotatedTypes get added manually at a later step annotatedTypesPerBda.put(defaultBeanArchiveInformation, annotatedTypesFromBdaClassPath(scanner.getBeanClasses(), foundClasses)); } else { // this path is only for backward compat to older ScannerService implementations Set<Class<?>> classIndex = scanner.getBeanClasses(); List<AnnotatedType<?>> annotatedTypes = annotatedTypesFromBdaClassPath(classIndex, foundClasses); annotatedTypesPerBda.put(defaultBeanArchiveInformation, annotatedTypes); } return annotatedTypesPerBda; }