public interface ClassFinder extends Serializable
For internal use only. May be renamed or removed in a future release.
Modifier and Type | Interface and Description |
---|---|
static class |
ClassFinder.CachedClassFinder
Implementation that proxy and cache a real
ClassFinder . |
static class |
ClassFinder.DefaultClassFinder
Implementation that searches for annotated classes or subclasses in a
list of classes.
|
Modifier and Type | Method and Description |
---|---|
Set<Class<?>> |
getAnnotatedClasses(Class<? extends Annotation> clazz)
Get annotated classes in the classloader.
|
default Set<Class<?>> |
getAnnotatedClasses(String className)
Get annotated classes in the classloader.
|
URL |
getResource(String name)
Get a resource from the classpath.
|
<T> Set<Class<? extends T>> |
getSubTypesOf(Class<T> type)
Gets all subtypes in hierarchy of a given type.
|
default <T> Set<Class<? extends T>> |
getSubTypesOf(String name)
Gets all subtypes in hierarchy of a given type, using FQN string.
|
<T> Class<T> |
loadClass(String name)
Load a class in the classloader.
|
Set<Class<?>> getAnnotatedClasses(Class<? extends Annotation> clazz)
clazz
- the annotationdefault Set<Class<?>> getAnnotatedClasses(String className) throws ClassNotFoundException
className
- the annotation class nameClassNotFoundException
- when the class not foundURL getResource(String name)
name
- class literal<T> Class<T> loadClass(String name) throws ClassNotFoundException
name
- the class literalClassNotFoundException
- when the class is not in the classpath<T> Set<Class<? extends T>> getSubTypesOf(Class<T> type)
T
- the class of the typetype
- the type to search for the subtypes fordefault <T> Set<Class<? extends T>> getSubTypesOf(String name) throws ClassNotFoundException
T
- the class of the typename
- Fully qualified name of the type to search subtypes ofClassNotFoundException
- when the parent class is not in the classpathCopyright © 2025. All rights reserved.