public Collection<Class<?>> findClassesWithAnnotationsInPackage(final Collection<Class<? extends Annotation>> annotations,
                                                                    final String... packageName) {
        try (val scanResult = new ClassGraph()
            .acceptPackages(packageName)
            .enableAnnotationInfo()
            .scan()) {
            return annotations
                .stream()
                .map(annotation -> scanResult.getClassesWithAnnotation(annotation).loadClasses())
                .flatMap(List::stream)
                .collect(Collectors.toList());
        }
    }
Finds all classes in the given package, which are annotated with at least one of the given annotations.

@param annotations The annotations to look for.
@param packageName The base package to look in.
@return The - possibly empty - collection of annotated classes.
api/cas-server-core-api-util/src/main/java/org/apereo/cas/util/ReflectionUtils.java