Package io.cucumber.cucumberexpressions
Class CucumberExpression
java.lang.Object
io.cucumber.cucumberexpressions.CucumberExpression
- All Implemented Interfaces:
Expression
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ParameterTypeRegistryprivate final List<ParameterType<?>> private final Stringprivate final TreeRegexp -
Constructor Summary
ConstructorsConstructorDescriptionCucumberExpression(String expression, ParameterTypeRegistry parameterTypeRegistry) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidassertNoNodeOfType(Node.Type nodeType, Node node, Function<Node, CucumberExpressionException> createException) private voidassertNoOptionals(Node node, Function<Node, CucumberExpressionException> createNodeContainedAnOptionalException) private voidassertNoParameters(Node node, Function<Node, CucumberExpressionException> createNodeContainedAParameterException) private voidassertNotEmpty(Node node, Function<Node, CucumberExpressionException> createNodeWasNotEmptyException) Matches a string to an expression.private StringrewriteAlternation(Node node) private StringrewriteAlternative(Node node) private StringrewriteExpression(Node node) private StringrewriteOptional(Node node) private StringrewriteParameter(Node node) private StringrewriteToRegex(Node node)
-
Field Details
-
parameterTypes
-
source
-
treeRegexp
-
parameterTypeRegistry
-
-
Constructor Details
-
CucumberExpression
CucumberExpression(String expression, ParameterTypeRegistry parameterTypeRegistry)
-
-
Method Details
-
rewriteToRegex
-
rewriteOptional
-
rewriteAlternation
-
rewriteAlternative
-
rewriteParameter
-
rewriteExpression
-
assertNotEmpty
private void assertNotEmpty(Node node, Function<Node, CucumberExpressionException> createNodeWasNotEmptyException) -
assertNoParameters
private void assertNoParameters(Node node, Function<Node, CucumberExpressionException> createNodeContainedAParameterException) -
assertNoOptionals
private void assertNoOptionals(Node node, Function<Node, CucumberExpressionException> createNodeContainedAnOptionalException) -
assertNoNodeOfType
private void assertNoNodeOfType(Node.Type nodeType, Node node, Function<Node, CucumberExpressionException> createException) -
match
Description copied from interface:ExpressionMatches a string to an expression. Empty if no match.- Specified by:
matchin interfaceExpression
-
getSource
- Specified by:
getSourcein interfaceExpression
-
getRegexp
- Specified by:
getRegexpin interfaceExpression
-