public class AnnotationLoader
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private org.reflections.Reflections |
reflections
A reflection instance for finding annotated classes.
|
Modifier | Constructor and Description |
---|---|
private |
AnnotationLoader()
Creates a new instance of the loader.
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.lang.Class<?>> |
getAnnotatedClasses(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Gets all classes annotated with the given annotation.
|
static void |
init()
Initializes and runs the loader.
|
private void |
run()
Runs the loader.
|
private org.reflections.Reflections reflections
private AnnotationLoader()
public static void init()
private void run() throws java.lang.Exception
java.lang.Exception
- Failed to load a class.public java.util.Set<java.lang.Class<?>> getAnnotatedClasses(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
annotationClass
- The class of the annotation.