public static class ClassFinder.CachedClassFinder extends Object implements ClassFinder
ClassFinder.ClassFinder.CachedClassFinder, ClassFinder.DefaultClassFinder| Constructor and Description |
|---|
CachedClassFinder(ClassFinder classFinder)
It uses specified classFinder and caches scanned annotation.
|
| Modifier and Type | Method and Description |
|---|---|
Set<Class<?>> |
getAnnotatedClasses(Class<? extends Annotation> annotation)
Get annotated classes in the classloader.
|
ClassLoader |
getClassLoader()
Get class loader which is used to find classes.
|
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.
|
<T> Class<T> |
loadClass(String name)
Load a class in the classloader.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAnnotatedClasses, getSubTypesOfpublic CachedClassFinder(ClassFinder classFinder)
classFinder - A real classFinder.public Set<Class<?>> getAnnotatedClasses(Class<? extends Annotation> annotation)
ClassFindergetAnnotatedClasses in interface ClassFinderannotation - the annotationpublic URL getResource(String name)
ClassFindergetResource in interface ClassFindername - class literalpublic <T> Class<T> loadClass(String name) throws ClassNotFoundException
ClassFinderloadClass in interface ClassFindername - the class literalClassNotFoundException - when the class is not in the classpathpublic <T> Set<Class<? extends T>> getSubTypesOf(Class<T> type)
ClassFindergetSubTypesOf in interface ClassFinderT - the class of the typetype - the type to search for the subtypes forpublic ClassLoader getClassLoader()
ClassFindergetClassLoader in interface ClassFinderCopyright © 2000–2020 Vaadin Ltd. All rights reserved.