Class GherkinParser

java.lang.Object
io.cucumber.gherkin.GherkinParser

public final class GherkinParser extends Object
Main entry point for the Gherkin library
  • Field Details

    • FEATURE_FILE_AVERAGE_LINE_LENGTH

      static final int FEATURE_FILE_AVERAGE_LINE_LENGTH
      Estimate of the average line length in a feature file.
      See Also:
    • FEATURE_FILE_AVERAGE_LINE_COUNT

      static final int FEATURE_FILE_AVERAGE_LINE_COUNT
      Estimate of the average number of lines in a feature file.
      See Also:
    • FEATURE_FILE_AVERAGE_SIZE

      static final int FEATURE_FILE_AVERAGE_SIZE
      Estimate of the average feature file size.
      See Also:
    • includeSource

      private final boolean includeSource
    • includeGherkinDocument

      private final boolean includeGherkinDocument
    • includePickles

      private final boolean includePickles
    • idGenerator

      private final GherkinParser.IdGenerator idGenerator
    • pickleCompiler

      private final PickleCompiler pickleCompiler
  • Constructor Details

    • GherkinParser

      private GherkinParser(boolean includeSource, boolean includeGherkinDocument, boolean includePickles, GherkinParser.IdGenerator idGenerator)
  • Method Details

    • builder

      public static GherkinParser.Builder builder()
    • parse

      public Stream<io.cucumber.messages.types.Envelope> parse(Path source) throws IOException
      Throws:
      IOException
    • parse

      public Stream<io.cucumber.messages.types.Envelope> parse(String uri, InputStream source) throws IOException
      Throws:
      IOException
    • parse

      public Stream<io.cucumber.messages.types.Envelope> parse(String uri, byte[] source)
    • parse

      public Stream<io.cucumber.messages.types.Envelope> parse(io.cucumber.messages.types.Envelope envelope)
    • parse

      private List<io.cucumber.messages.types.Envelope> parse(io.cucumber.messages.types.Source source)
    • parse

      private List<io.cucumber.messages.types.Envelope> parse(String uri, String data)
    • createParseError

      private io.cucumber.messages.types.Envelope createParseError(ParserError e, String uri)