public class ScanningStepsFactory extends AbstractStepsFactory
InjectableStepsFactory
that scans for classes in the classpath.
The constructors allows the specification of the package names to scan or the
root class from which the package name is derived. All classes that include
any step method annotation (Given
, When
, Then
,
Before
, After
, etc ... ) will be collected in the scan.
Additional regex filters on the class names are provided via the
matchingNames(String)
and notMatchingNames(String)
methods,
which by default match all names.AbstractStepsFactory.StepsInstanceNotFound
Constructor and Description |
---|
ScanningStepsFactory(Configuration configuration,
Class<?> root) |
ScanningStepsFactory(Configuration configuration,
String... packageNames) |
Modifier and Type | Method and Description |
---|---|
Object |
createInstanceOfType(Class<?> type) |
ScanningStepsFactory |
matchingNames(String matchingRegex) |
ScanningStepsFactory |
notMatchingNames(String notMatchingRegex) |
protected List<Class<?>> |
stepsTypes() |
createCandidateSteps, hasAnnotatedMethods
public ScanningStepsFactory(Configuration configuration, Class<?> root)
public ScanningStepsFactory(Configuration configuration, String... packageNames)
public ScanningStepsFactory matchingNames(String matchingRegex)
public ScanningStepsFactory notMatchingNames(String notMatchingRegex)
protected List<Class<?>> stepsTypes()
stepsTypes
in class AbstractStepsFactory
Copyright © 2003–2015. All rights reserved.