Package com.vaadin.flow.testutil
Class ClassFinder
java.lang.Object
com.vaadin.flow.testutil.ClassFinder
- Direct Known Subclasses:
ClassesSerializableTest
Superclass for testing classes which need to scan project's classpath.
- Author:
- Vaadin Ltd
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindServerClasses(String classpathEntry, Collection<Pattern> excludes) Finds the server side classes/interfaces under a class path entry - either a directory or a JAR that matchesgetJarPattern().protected PatternJARs that will be scanned for classes to test, in addition to classpath directories.Lists all class path entries by splitting the class path string.protected static booleanisFunctionalType(Type type) protected booleanisTestClass(Class<?> cls) protected booleanisTestClassPath(String classPath)
-
Constructor Details
-
ClassFinder
public ClassFinder()
-
-
Method Details
-
isTestClassPath
-
isFunctionalType
-
getRawClasspathEntries
Lists all class path entries by splitting the class path string.Adapted from ClassPathExplorer.getRawClasspathEntries(), but without filtering.
- Returns:
- List of class path segment strings
-
getJarPattern
JARs that will be scanned for classes to test, in addition to classpath directories.- Returns:
- the compiled pattern
-
getBasePackages
-
isTestClass
-
findServerClasses
protected List<String> findServerClasses(String classpathEntry, Collection<Pattern> excludes) throws IOException Finds the server side classes/interfaces under a class path entry - either a directory or a JAR that matchesgetJarPattern().Only classes under
getBasePackages()are considered, and those matchingexcludesare filtered out.- Throws:
IOException
-