Package io.cucumber.messages.types
Class Snippet
- java.lang.Object
-
- io.cucumber.messages.types.Snippet
-
public final class Snippet extends Object
Represents the Snippet message in Cucumber's message protocol
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetCode()A snippet of codeStringgetLanguage()The programming language of the code.inthashCode()StringtoString()
-
-
-
Method Detail
-
getLanguage
public String getLanguage()
The programming language of the code.This must be formatted as an all lowercase identifier such that syntax highlighters like [Prism](https://prismjs.com/#supported-languages) or [Highlight.js](https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md) can recognize it. For example: `cpp`, `cs`, `go`, `java`, `javascript`, `php`, `python`, `ruby`, `scala`.
-
getCode
public String getCode()
A snippet of code
-
-