|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StepPatternBuilder
Builds a regex pattern from a template step, as provided in the annotations, which will in turn match real steps conforming to the template. Eg: "I give $money to $name" becomes "I give (.*) to (.*)", which matches "I give £10 to Fred". The captured arguments will be "£10" and "Fred".
To create your own pattern builder, the text in the annotation should be converted to a pattern that matches a real step in the core with any precursor words removed. The arguments in the real step should be the only captured groups.
Method Summary | |
---|---|
Pattern |
buildPattern(String matchThis)
Builds a regexp pattern from a template step. |
String[] |
extractGroupNames(String string)
Extract the parameter names from a template step |
Method Detail |
---|
Pattern buildPattern(String matchThis)
matchThis
- the template step
String[] extractGroupNames(String string)
step
- the template step
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |