Class GherkinDocument

java.lang.Object
io.cucumber.messages.types.GherkinDocument

public final class GherkinDocument extends Object
Represents the GherkinDocument message in Cucumber's message protocol

The [AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree) of a Gherkin document. Cucumber implementations should *not* depend on `GherkinDocument` or any of its children for execution - use [Pickle](#io.cucumber.messages.Pickle) instead.

The only consumers of `GherkinDocument` should only be formatters that produce "rich" output, resembling the original Gherkin document.

  • Constructor Details

  • Method Details

    • getUri

      public Optional<String> getUri()
      The [URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier) of the source, typically a file path relative to the root directory
    • getFeature

      public Optional<Feature> getFeature()
    • getComments

      public List<Comment> getComments()
      All the comments in the Gherkin document
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object