Class GherkinDialect

java.lang.Object
io.cucumber.gherkin.GherkinDialect

public final class GherkinDialect extends Object
Holds all localized keywords for a single language.
  • Field Details

    • LONGEST_TO_SHORTEST_COMPARATOR

      private static final Comparator<String> LONGEST_TO_SHORTEST_COMPARATOR
    • language

      private final String language
    • name

      private final String name
    • nativeName

      private final String nativeName
    • featureKeywords

      private final List<String> featureKeywords
    • ruleKeywords

      private final List<String> ruleKeywords
    • scenarioKeywords

      private final List<String> scenarioKeywords
    • scenarioOutlineKeywords

      private final List<String> scenarioOutlineKeywords
    • backgroundKeywords

      private final List<String> backgroundKeywords
    • examplesKeywords

      private final List<String> examplesKeywords
    • givenKeywords

      private final List<String> givenKeywords
    • whenKeywords

      private final List<String> whenKeywords
    • thenKeywords

      private final List<String> thenKeywords
    • andKeywords

      private final List<String> andKeywords
    • butKeywords

      private final List<String> butKeywords
    • stepKeywords

      private final List<String> stepKeywords
    • stepKeywordsTypes

      private final Map<String,Set<io.cucumber.messages.types.StepKeywordType>> stepKeywordsTypes
  • Constructor Details

  • Method Details

    • distinctKeywords

      @SafeVarargs private static List<String> distinctKeywords(List<String>... keywords)
    • aggregateKeywordTypes

      private static Map<String,Set<io.cucumber.messages.types.StepKeywordType>> aggregateKeywordTypes(List<String> givenKeywords, List<String> whenKeywords, List<String> thenKeywords, List<String> andKeywords, List<String> butKeywords)
    • addStepKeywordsTypes

      private static void addStepKeywordsTypes(Map<String,Set<io.cucumber.messages.types.StepKeywordType>> accumulator, io.cucumber.messages.types.StepKeywordType type, List<String> keywords)
    • getFeatureKeywords

      public List<String> getFeatureKeywords()
    • getName

      public String getName()
    • getNativeName

      public String getNativeName()
    • getRuleKeywords

      public List<String> getRuleKeywords()
    • getScenarioKeywords

      public List<String> getScenarioKeywords()
    • getScenarioOutlineKeywords

      public List<String> getScenarioOutlineKeywords()
    • getStepKeywords

      public List<String> getStepKeywords()
    • getStepKeywordTypes

      @Deprecated public @Nullable List<io.cucumber.messages.types.StepKeywordType> getStepKeywordTypes(String keyword)
      Deprecated.
      Returns the StepKeywordTypes for a given keyword
      Parameters:
      keyword - to get the keyword type for
      Returns:
      the keywords type
    • getStepKeywordTypesSet

      public Set<io.cucumber.messages.types.StepKeywordType> getStepKeywordTypesSet(String keyword)
      Returns the StepKeywordTypes for a given keyword
      Parameters:
      keyword - to get the keyword type for
      Returns:
      the keywords type
    • getBackgroundKeywords

      public List<String> getBackgroundKeywords()
    • getExamplesKeywords

      public List<String> getExamplesKeywords()
    • getGivenKeywords

      public List<String> getGivenKeywords()
    • getWhenKeywords

      public List<String> getWhenKeywords()
    • getThenKeywords

      public List<String> getThenKeywords()
    • getAndKeywords

      public List<String> getAndKeywords()
    • getButKeywords

      public List<String> getButKeywords()
    • getLanguage

      public String getLanguage()