Class ReflectiveComponentScanner
- java.lang.Object
-
- io.streamthoughts.azkarra.streams.components.ReflectiveComponentScanner
-
- All Implemented Interfaces:
ComponentScanner
public class ReflectiveComponentScanner extends Object implements ComponentScanner
TheReflectiveComponentScanner
class can be used to scan the classpath for automatically registering declared classes annotated withComponent
andComponentFactory
classes.
-
-
Constructor Summary
Constructors Constructor Description ReflectiveComponentScanner(ComponentRegistry registry)
Creates a newReflectiveComponentScanner
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
scan(String componentPaths)
Scans external component for the specified paths.void
scan(List<String> componentPaths)
Scans external component for the specified paths.void
scanComponentPath(Path componentPath)
Scans the specified top-level component directory for components.void
scanForPackage(Package source)
Scans the specified package for components.void
scanForPackage(String source)
Scans the specified package for components.
-
-
-
Constructor Detail
-
ReflectiveComponentScanner
public ReflectiveComponentScanner(ComponentRegistry registry)
Creates a newReflectiveComponentScanner
instance.- Parameters:
registry
- theComponentRegistry
used to register providers.
-
-
Method Detail
-
scanComponentPath
public void scanComponentPath(Path componentPath)
Scans the specified top-level component directory for components.- Specified by:
scanComponentPath
in interfaceComponentScanner
- Parameters:
componentPath
- the absolute path to a top-level component directory.
-
scan
public void scan(String componentPaths)
Scans external component for the specified paths.- Specified by:
scan
in interfaceComponentScanner
- Parameters:
componentPaths
- the comma-separated list of top-level components directories.
-
scan
public void scan(List<String> componentPaths)
Scans external component for the specified paths.- Specified by:
scan
in interfaceComponentScanner
- Parameters:
componentPaths
- the list of top-level components directories.
-
scanForPackage
public void scanForPackage(Package source)
Scans the specified package for components.- Specified by:
scanForPackage
in interfaceComponentScanner
- Parameters:
source
- thePackage
to be scanned; must not benull
.
-
scanForPackage
public void scanForPackage(String source)
Scans the specified package for components.- Specified by:
scanForPackage
in interfaceComponentScanner
- Parameters:
source
- the package to be scanned; must not benull
.
-
-