optaplanner-core/src/main/java/org/optaplanner/core/config/domain/ScanAnnotatedClassesConfig.java
public SolutionDescriptor buildSolutionDescriptor(SolverConfigContext configContext, ScoreDefinition deprecatedScoreDefinition) {
        ClassLoader[] classLoaders;
        if (configContext.getClassLoader() != null) {
            classLoaders = new ClassLoader[] {configContext.getClassLoader()};
        } else if (configContext.getKieContainer() != null) {
            classLoaders = new ClassLoader[] {configContext.getKieContainer().getClassLoader()};
            ReflectionsKieVfsUrlType.register(configContext.getKieContainer());
        } else {
            classLoaders = new ClassLoader[0];
        }
        ConfigurationBuilder builder = new ConfigurationBuilder();
        if (!ConfigUtils.isEmptyCollection(packageIncludeList)) {
            FilterBuilder filterBuilder = new FilterBuilder();
            for (String packageInclude : packageIncludeList) {
                if (StringUtils.isEmpty(packageInclude)) {
                    throw new IllegalArgumentException("The scanAnnotatedClasses (" + this
                            + ") has a packageInclude (" + packageInclude
                            + ") that is empty or null. Remove it or fill it in.");
                }
                builder.addUrls(ReflectionsWorkaroundClasspathHelper.forPackage(packageInclude, classLoaders));
                filterBuilder.includePackage(packageInclude);
            }
            builder.filterInputsBy(filterBuilder);
        } else {
            builder.addUrls(ReflectionsWorkaroundClasspathHelper.forPackage("", classLoaders));
        }
        builder.setClassLoaders(classLoaders);
        Reflections reflections = new Reflections(builder);
        Class<?> solutionClass = loadSolutionClass(reflections);
        List<Class<?>> entityClassList = loadEntityClassList(reflections);
        return SolutionDescriptor.buildSolutionDescriptor(solutionClass, entityClassList, deprecatedScoreDefinition);
    }
public SolutionDescriptor buildSolutionDescriptor(SolverConfigContext configContext, ScoreDefinition deprecatedScoreDefinition) {
        ClassLoader[] classLoaders;
        if (configContext.getClassLoader() != null) {
            classLoaders = new ClassLoader[] {configContext.getClassLoader()};
        } else if (configContext.getKieContainer() != null) {
            classLoaders = new ClassLoader[] {configContext.getKieContainer().getClassLoader()};
            ReflectionsKieVfsUrlType.register(configContext.getKieContainer());
        } else {
            classLoaders = new ClassLoader[0];
        }
        ConfigurationBuilder builder = new ConfigurationBuilder();
        if (!ConfigUtils.isEmptyCollection(packageIncludeList)) {
            FilterBuilder filterBuilder = new FilterBuilder();
            for (String packageInclude : packageIncludeList) {
                if (StringUtils.isEmpty(packageInclude)) {
                    throw new IllegalArgumentException("The scanAnnotatedClasses (" + this
                            + ") has a packageInclude (" + packageInclude
                            + ") that is empty or null. Remove it or fill it in.");
                }
                builder.addUrls(ReflectionsWorkaroundClasspathHelper.forPackage(packageInclude, classLoaders));
                filterBuilder.includePackage(packageInclude);
            }
            builder.filterInputsBy(filterBuilder);
        } else {
            builder.addUrls(ReflectionsWorkaroundClasspathHelper.forPackage("", classLoaders));
        }
        builder.setClassLoaders(classLoaders);
        Reflections reflections = new Reflections(builder);
        Class<?> solutionClass = loadSolutionClass(reflections);
        List<Class<?>> entityClassList = loadEntityClassList(reflections);
        return SolutionDescriptor.buildSolutionDescriptor(solutionClass, entityClassList, deprecatedScoreDefinition);
    }
************************************************************************