Package org.jbehave.core.steps
Class ScanningStepsFactory
- java.lang.Object
-
- org.jbehave.core.steps.AbstractStepsFactory
-
- org.jbehave.core.steps.ScanningStepsFactory
-
- All Implemented Interfaces:
InjectableStepsFactory
public class ScanningStepsFactory extends AbstractStepsFactory
AnInjectableStepsFactory
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 thematchingNames(String)
andnotMatchingNames(String)
methods, which by default match all names.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jbehave.core.steps.AbstractStepsFactory
AbstractStepsFactory.StepsInstanceNotFound
-
-
Constructor Summary
Constructors Constructor Description ScanningStepsFactory(Configuration configuration, Class<?> root)
ScanningStepsFactory(Configuration configuration, String... packageNames)
-
Method Summary
Modifier and Type Method Description Object
createInstanceOfType(Class<?> type)
ScanningStepsFactory
matchingNames(String matchingRegex)
ScanningStepsFactory
notMatchingNames(String notMatchingRegex)
protected List<Class<?>>
stepsTypes()
-
Methods inherited from class org.jbehave.core.steps.AbstractStepsFactory
createCandidateSteps, hasAnnotatedMethods
-
-
-
-
Constructor Detail
-
ScanningStepsFactory
public ScanningStepsFactory(Configuration configuration, Class<?> root)
-
ScanningStepsFactory
public ScanningStepsFactory(Configuration configuration, String... packageNames)
-
-
Method Detail
-
matchingNames
public ScanningStepsFactory matchingNames(String matchingRegex)
-
notMatchingNames
public ScanningStepsFactory notMatchingNames(String notMatchingRegex)
-
stepsTypes
protected List<Class<?>> stepsTypes()
- Specified by:
stepsTypes
in classAbstractStepsFactory
-
-