@API(status=STABLE)
public interface Snippet
-
Method Summary
Modifier and TypeMethodDescriptionConstructs a string representation of the arguments a step definition should accept.escapePattern(String pattern) Escape representation of the pattern, if escaping is necessary.language()The programming language of the generated snippet.Returns a hint about alternative ways to declare a table argumenttemplate()Returns aMessageFormattemplate used to generate a snippet.
-
Method Details
-
language
The programming language of the generated snippet.- Returns:
- the language of the generated snippet.
- See Also:
-
template
MessageFormat template()Returns aMessageFormattemplate used to generate a snippet.The template can access the following variables:
- {0} : Step Keyword
- {1} : Value of
escapePattern(String) - {2} : Function name
- {3} : Value of
arguments(Map) - {4} : Regexp hint comment
- {5} : value of
tableHint()if the step has a table
- Returns:
- a template used to generate a snippet.
-
tableHint
String tableHint()Returns a hint about alternative ways to declare a table argument- Returns:
- a hint about alternative ways to declare a table argument
-
arguments
Constructs a string representation of the arguments a step definition should accept. The arguments are provided a map of (suggested) names and types. The arguments are ordered by their position.- Parameters:
arguments- ordered pairs of names and types- Returns:
- a string representation of the arguments
-
escapePattern
Escape representation of the pattern, if escaping is necessary.- Parameters:
pattern- the computed pattern that will match an undefined step- Returns:
- an escaped representation of the pattern, if escaping is necessary.
-