Class GlueCodeScanner
java.lang.Object
com.arc_e_tect.gradle.gherkin.glue.GlueCodeScanner
Scans a directory of Cucumber-JVM glue code (step definition source files) and
extracts every
@Given/@When/@Then step definition pattern
as a compiled Expression.
Step definitions are matched with a regular expression over the raw source text
rather than a full Java/Kotlin parser, since only the string literal passed to the
annotation is needed. Both Cucumber Expressions and regular-expression step patterns
are supported, since ExpressionFactory auto-detects which kind a given
pattern is.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
GlueCodeScanner
public GlueCodeScanner()Creates a newGlueCodeScanner.
-
-
Method Details
-
scan
Recursively scansglueCodeDirfor step definition source files and returns every step pattern found as a compiledExpression.- Parameters:
glueCodeDir- directory containing the glue code source files- Returns:
- step definition patterns found across all source files; patterns that cannot be compiled are skipped and logged as a warning
-