Package io.cucumber.messages.types
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- See Also:
- Github - Cucumber - Messages //// Source A source file, typically a Gherkin document or Java/Ruby/JavaScript source code
-
-
Constructor Summary
Constructors Constructor Description Source(String uri, String data, SourceMediaType mediaType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetData()The contents of the fileSourceMediaTypegetMediaType()The media type of the file.StringgetUri()The [URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier) of the source, typically a file path relative to the root directoryinthashCode()StringtoString()
-
-
-
Constructor Detail
-
Source
public Source(String uri, String data, SourceMediaType mediaType)
-
-
Method Detail
-
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
-
-