com.liubs.shadowrpcfly.server.util.PackageScanUtil Maven / Gradle / Ivy
package com.liubs.shadowrpcfly.server.util;
import org.reflections.Reflections;
import java.lang.annotation.Annotation;
import java.util.Set;
/**
* @author Liubsyy
* @date 2024/1/15
*/
public class PackageScanUtil {
public static Set> scanClasses(String packageName, Class extends Annotation> annotation) {
Reflections reflections = new Reflections(packageName);
return reflections.getTypesAnnotatedWith(annotation);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy