Class Source

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

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

A source file, typically a Gherkin document or Java/Ruby/JavaScript source code

  • Constructor Details

  • Method Details

    • getUri

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

      public String getData()
      The contents of the file
    • getMediaType

      public SourceMediaType getMediaType()
      The media type of the file. Can be used to specify custom types, such as text/x.cucumber.gherkin+plain
    • 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