Class RegexCompositeParser

java.lang.Object
org.jbehave.core.parsers.RegexCompositeParser
All Implemented Interfaces:
CompositeParser

public class RegexCompositeParser extends Object implements CompositeParser
Pattern-based composite parser, which uses the keywords provided to parse the textual composite steps into a list of Composite.
Author:
Mauro Talevi, Valery Yatsynovich
  • Field Details

  • Constructor Details

    • RegexCompositeParser

      public RegexCompositeParser()
    • RegexCompositeParser

      public RegexCompositeParser(Keywords keywords)
  • Method Details

    • parseComposites

      public List<Composite> parseComposites(String compositesAsText)
      Description copied from interface: CompositeParser
      Parses composite steps from their textual representation
      Specified by:
      parseComposites in interface CompositeParser
      Parameters:
      compositesAsText - the textual representation
      Returns:
      The List of Composite
    • keywords

      protected Keywords keywords()
    • splitElements

      protected List<String> splitElements(String text, String keyword)
    • startingWithNL

      protected String startingWithNL(String text)
    • findSteps

      protected List<String> findSteps(String stepsAsText)
    • concatenateStartingWords

      protected String concatenateStartingWords()
    • concatenateWithOr

      protected String concatenateWithOr(String beforeKeyword, List<String> keywords)