public class Content<D,T> extends Data implements Parser.Token<D,T>
Constructor and Description |
---|
Content(Location<D> location,
String text,
T type) |
Content(Parser.Token<D,T> token) |
Modifier and Type | Method and Description |
---|---|
Location<D> |
getLocation()
Returns the source location of this token.
|
String |
getText()
Returns the text content of this token.
|
T |
getType()
Returns the type of this token.
|
String |
toString() |
static <D,T> Data.View<Content<D,T>> |
viewContent() |
static Data.View<String> |
viewText() |
public Content(Parser.Token<D,T> token)
public Location<D> getLocation()
Parser.Token
The default implementation returns null
.
getLocation
in interface Parser.Token<D,T>
null
if
not available.public String getText()
Parser.Token
getText
in interface Parser.Token<D,T>
public T getType()
Parser.Token
getType
in interface Parser.Token<D,T>
see also the complete user documentation .