Package org.webharvest.utils
Class ClassPathScannerImpl
- java.lang.Object
-
- org.webharvest.utils.ClassPathScannerImpl
-
- All Implemented Interfaces:
ClassPathScanner
public final class ClassPathScannerImpl extends Object implements ClassPathScanner
ClassPathScanner
interface implementation using Reflections library under the hood.- Since:
- 2.1.0-SNAPSHOT
- Version:
- %I%, %G%
- Author:
- Piotr Dyraga
- See Also:
ClassPathScanner
-
-
Constructor Summary
Constructors Constructor Description ClassPathScannerImpl(String packageName)
Constructor accepting name of the java package.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<Class<?>>
getTypesAnnotatedWith(Class<? extends Annotation> annotation)
ReturnsSet
of all types annotated with the given annotation.
-
-
-
Constructor Detail
-
ClassPathScannerImpl
public ClassPathScannerImpl(String packageName)
Constructor accepting name of the java package. Components under this package and its subpackages are going to be scanned.- Parameters:
packageName
- target package name; mandatory, must not benull
-
-
Method Detail
-
getTypesAnnotatedWith
public Set<Class<?>> getTypesAnnotatedWith(Class<? extends Annotation> annotation)
ReturnsSet
of all types annotated with the given annotation.- Specified by:
getTypesAnnotatedWith
in interfaceClassPathScanner
- Parameters:
annotation
- desired type annotation- Returns:
- all types meeting annotation criteria
-
-