public static Optional<Class<?>> findClassBySimpleNameInPackage(final String simpleName, final String... packageName) {
        try (val scanResult = new ClassGraph()
            .acceptPackages(packageName)
            .enableClassInfo()
            .scan()) {

            return scanResult.getAllClasses()
                .stream()
                .filter(classInfo -> classInfo.getSimpleName().equalsIgnoreCase(simpleName))
                .findFirst()
                .map(ClassInfo::loadClass);
        }
    }
Finds a class with the given {@link Class#getSimpleName()} below the given package.

@param simpleName  The simple name of the class.
@param packageName The base package to look in.
@return The found class.
api/cas-server-core-api-util/src/main/java/org/apereo/cas/util/ReflectionUtils.java