Package groovy.json
Class JsonToken
java.lang.Object
groovy.json.JsonToken
public class JsonToken
extends java.lang.Object
A JSON token, with a type, line / column information, and the text of that token.
- Since:
- 1.8.0
-
Constructor Summary
Constructors Constructor Description JsonToken() -
Method Summary
Modifier and Type Method Description longgetEndColumn()longgetEndLine()longgetStartColumn()longgetStartLine()java.lang.StringgetText()JsonTokenTypegetType()java.lang.ObjectgetValue()Return the value represented by this token (ie.voidsetEndColumn(long endColumn)voidsetEndLine(long endLine)voidsetStartColumn(long startColumn)voidsetStartLine(long startLine)voidsetText(java.lang.String text)voidsetType(JsonTokenType type)java.lang.StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
JsonToken
public JsonToken()
-
-
Method Details
-
getValue
public java.lang.Object getValue()Return the value represented by this token (ie. a number, a string, a boolean or null). For numbers, BigDecimal is returned for decimals and Integer, Long or BigInteger for integral numbers.- Returns:
- the represented value
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
getStartLine
public long getStartLine() -
setStartLine
public void setStartLine(long startLine) -
getEndLine
public long getEndLine() -
setEndLine
public void setEndLine(long endLine) -
getStartColumn
public long getStartColumn() -
setStartColumn
public void setStartColumn(long startColumn) -
getEndColumn
public long getEndColumn() -
setEndColumn
public void setEndColumn(long endColumn) -
getType
-
setType
-
setText
public void setText(java.lang.String text) -
getText
public java.lang.String getText()
-