Interface ClassFinder
For security reasons ASM is used to find the annotations. Classes are not loaded unless they match the requirements of a called findAnnotated* method. Once loaded, these classes are cached.
The getClassesNotLoaded() method can be used immediately after any find* method to get a list of classes which matched the find requirements (i.e. contained the annotation), but were unable to be loaded.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
static class
static class
static class
static interface
static class
static class
-
Method Summary
Modifier and TypeMethodDescriptionfindAnnotatedClasses
(Class<? extends Annotation> annotation) List<Constructor<?>>
findAnnotatedConstructors
(Class<? extends Annotation> annotation) findAnnotatedFields
(Class<? extends Annotation> annotation) findAnnotatedMethods
(Class<? extends Annotation> annotation) findAnnotatedPackages
(Class<? extends Annotation> annotation) findClasses
(Test<ClassFinder.ClassInfo> test) findClassesInPackage
(String packageName, boolean recursive) Returns a list of classes that could not be loaded in last invoked findAnnotated* method.boolean
isAnnotationPresent
(Class<? extends Annotation> annotation)
-
Method Details
-
isAnnotationPresent
-
getClassesNotLoaded
Returns a list of classes that could not be loaded in last invoked findAnnotated* method.
The list will only contain entries of classes whose byte code matched the requirements of last invoked find* method, but were unable to be loaded and included in the results.
The list returned is unmodifiable. Once obtained, the returned list will be a live view of the results from the last findAnnotated* method call.
This method is not thread safe.
- Returns:
- an unmodifiable live view of classes that could not be loaded in previous findAnnotated* call.
-
findAnnotatedPackages
-
findAnnotatedClasses
-
findAnnotatedMethods
-
findAnnotatedConstructors
-
findAnnotatedFields
-
findClassesInPackage
-
findClasses
-
findClasses
-
getClassLoaderInterface
ClassLoaderInterface getClassLoaderInterface()
-