Package com.vaadin.flow.server.scanner
Class ReflectionsClassFinder
java.lang.Object
com.vaadin.flow.server.scanner.ReflectionsClassFinder
- All Implemented Interfaces:
com.vaadin.flow.server.frontend.scanner.ClassFinder,Serializable,AutoCloseable
public class ReflectionsClassFinder
extends Object
implements com.vaadin.flow.server.frontend.scanner.ClassFinder, AutoCloseable
A class finder using org.reflections.
- Since:
- 2.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.flow.server.frontend.scanner.ClassFinder
com.vaadin.flow.server.frontend.scanner.ClassFinder.CachedClassFinder, com.vaadin.flow.server.frontend.scanner.ClassFinder.DefaultClassFinder -
Constructor Summary
ConstructorsConstructorDescriptionReflectionsClassFinder(ClassLoader classLoader, URL... urls) ReflectionsClassFinder(URL... urls) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static URLdisableJarCaching(URL url) Wraps ajar:URL with a handler that disables JVM-level JAR caching.getAnnotatedClasses(Class<? extends Annotation> clazz) getResource(String name) getSubTypesOf(Class<T> type) <T> Class<T> booleanshouldInspectClass(String className) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.server.frontend.scanner.ClassFinder
getAnnotatedClasses, getSubTypesOf
-
Constructor Details
-
ReflectionsClassFinder
Constructor.- Parameters:
urls- the list of urls for finding classes.
-
ReflectionsClassFinder
-
-
Method Details
-
getAnnotatedClasses
- Specified by:
getAnnotatedClassesin interfacecom.vaadin.flow.server.frontend.scanner.ClassFinder
-
getResource
- Specified by:
getResourcein interfacecom.vaadin.flow.server.frontend.scanner.ClassFinder
-
disableJarCaching
Wraps ajar:URL with a handler that disables JVM-level JAR caching. PreventsJarFileFactoryfrom caching staleJarFileinstances across daemon builds (Gradle daemon, mvnd).- Parameters:
url- the URL to wrap, may benull- Returns:
- a wrapped URL with caching disabled for
jar:protocol, or the original URL for other protocols ornullinput
-
shouldInspectClass
- Specified by:
shouldInspectClassin interfacecom.vaadin.flow.server.frontend.scanner.ClassFinder
-
loadClass
- Specified by:
loadClassin interfacecom.vaadin.flow.server.frontend.scanner.ClassFinder- Throws:
ClassNotFoundException
-
getSubTypesOf
- Specified by:
getSubTypesOfin interfacecom.vaadin.flow.server.frontend.scanner.ClassFinder
-
getClassLoader
- Specified by:
getClassLoaderin interfacecom.vaadin.flow.server.frontend.scanner.ClassFinder
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-