Class AbstractJavaSnippet

java.lang.Object
io.cucumber.java.AbstractJavaSnippet
All Implemented Interfaces:
Snippet
Direct Known Subclasses:
JavaSnippet

abstract class AbstractJavaSnippet extends Object implements Snippet
  • Constructor Details

    • AbstractJavaSnippet

      AbstractJavaSnippet()
  • Method Details

    • language

      public Optional<String> language()
      Description copied from interface: Snippet
      The programming language of the generated snippet.
      Specified by:
      language in interface Snippet
      Returns:
      the language of the generated snippet.
      See Also:
      • Snippet.getLanguage()
    • tableHint

      public final String tableHint()
      Description copied from interface: Snippet
      Returns a hint about alternative ways to declare a table argument
      Specified by:
      tableHint in interface Snippet
      Returns:
      a hint about alternative ways to declare a table argument
    • arguments

      public final String arguments(Map<String,Type> arguments)
      Description copied from interface: Snippet
      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.
      Specified by:
      arguments in interface Snippet
      Parameters:
      arguments - ordered pairs of names and types
      Returns:
      a string representation of the arguments
    • getArgType

      private String getArgType(Type argType)
    • escapePattern

      public final String escapePattern(String pattern)
      Description copied from interface: Snippet
      Escape representation of the pattern, if escaping is necessary.
      Specified by:
      escapePattern in interface Snippet
      Parameters:
      pattern - the computed pattern that will match an undefined step
      Returns:
      an escaped representation of the pattern, if escaping is necessary.