Package io.cucumber.messages.types
Class Source
- java.lang.Object
-
- io.cucumber.messages.types.Source
-
public class Source extends Object
//// Source * A source file, typically a Gherkin document or Java/Ruby/JavaScript source code
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSource.MediaTypeThe media type of the file.
-
Constructor Summary
Constructors Constructor Description Source()No args constructor for use in serializationSource(String uri, String data, Source.MediaType mediaType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)StringgetData()The contents of the file (Required)Source.MediaTypegetMediaType()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 directory (Required)inthashCode()voidsetData(String data)The contents of the file (Required)voidsetMediaType(Source.MediaType mediaType)The media type of the file.voidsetUri(String uri)* The [URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier) of the source, typically a file path relative to the root directory (Required)StringtoString()
-
-
-
Constructor Detail
-
Source
public Source()
No args constructor for use in serialization
-
Source
public Source(String uri, String data, Source.MediaType mediaType)
- Parameters:
data-mediaType-uri-
-
-
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 (Required)
-
setUri
public void setUri(String uri)
* The [URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier) of the source, typically a file path relative to the root directory (Required)
-
getData
public String getData()
The contents of the file (Required)
-
setData
public void setData(String data)
The contents of the file (Required)
-
getMediaType
public Source.MediaType getMediaType()
The media type of the file. Can be used to specify custom types, such as text/x.cucumber.gherkin+plain (Required)
-
setMediaType
public void setMediaType(Source.MediaType mediaType)
The media type of the file. Can be used to specify custom types, such as text/x.cucumber.gherkin+plain (Required)
-
-