Class ClassScanner
-
- All Implemented Interfaces:
-
java.io.Closeable
,java.lang.AutoCloseable
public class ClassScanner implements Closeable
This class should be used from a try-with-resouces block or another closable object as the internal scan result can take up a lot of resources.
-
-
Constructor Summary
Constructors Constructor Description ClassScanner(List<String> supportedPackages)
-
Method Summary
Modifier and Type Method Description final Boolean
isEmptyScan()
Return true if there are no valid packages scanned final List<KClass<?>>
getSubTypesOf(KClass<?> kclass)
Get the sub-types/implementations of specific KClass final List<KClass<out Object>>
getClassesWithAnnotation(KClass<?> annotation)
Find any class that has the specified annotation Unit
close()
Clean up the scan result resources -
-
Method Detail
-
isEmptyScan
final Boolean isEmptyScan()
Return true if there are no valid packages scanned
-
getSubTypesOf
final List<KClass<?>> getSubTypesOf(KClass<?> kclass)
Get the sub-types/implementations of specific KClass
-
getClassesWithAnnotation
final List<KClass<out Object>> getClassesWithAnnotation(KClass<?> annotation)
Find any class that has the specified annotation
-
-
-
-