Skip to content

Package io.github.qishr.cascara.lang.json.ast

Class JsonComment

java.lang.Object
        io.github.qishr.cascara.lang.json.ast.JsonNode
                io.github.qishr.cascara.lang.json.ast.JsonComment

All Implemented Interfaces:
    ScalarAstNode<JsonNode>, CommentAstNode


public class JsonComment
extends JsonNode

Constructor Summary

Constructor Description
JsonComment(int line, int column, String rawValue, String stringValue, boolean multiLine)

Method Summary

Modifier and Type Method Description
public String getContent()
public PrimitiveType getPrimitiveType()
public JsonComment setQuoteStyle(QuoteStyle style)
public QuoteStyle getQuoteStyle()
public List<JsonNode> getChildren()
public List<CommentAstNode> getComments()
public String getLexeme() Returns the original raw string as seen in the source file.
public int asInteger()
public int asInteger(int defaultValue)
public double asDouble()
public double asDouble(double defaultValue)
public boolean asBoolean()
public boolean asBoolean(boolean defaultValue)
public Object getPrimitive()
public String asString()
public boolean isMultiLine()

Methods inherited from JsonNode

getEndColumn, getEndLine, getStartColumn, getToken, setToken, equals, addComment, getStartLine, hashCode

Method Details

getContent

public String getContent()

Specified By:

ScalarAstNode


getPrimitiveType

public PrimitiveType getPrimitiveType()

Specified By:

ScalarAstNode


setQuoteStyle

public JsonComment setQuoteStyle(QuoteStyle style)

Specified By:

ScalarAstNode


getQuoteStyle

public QuoteStyle getQuoteStyle()

Specified By:

ScalarAstNode


getChildren

public List<JsonNode> getChildren()

Overrides:

JsonNode


getComments

public List<CommentAstNode> getComments()

Overrides:

JsonNode


getLexeme

public String getLexeme()

Returns the original raw string as seen in the source file.

Specified By:

CommentAstNode


asInteger

public int asInteger()

Specified By:

ScalarAstNode


asInteger

public int asInteger(int defaultValue)

Specified By:

ScalarAstNode


asDouble

public double asDouble()

Specified By:

ScalarAstNode


asDouble

public double asDouble(double defaultValue)

Specified By:

ScalarAstNode


asBoolean

public boolean asBoolean()

Specified By:

ScalarAstNode


asBoolean

public boolean asBoolean(boolean defaultValue)

Specified By:

ScalarAstNode


getPrimitive

public Object getPrimitive()

Specified By:

ScalarAstNode


asString

public String asString()

Specified By:

CommentAstNode


isMultiLine

public boolean isMultiLine()

Specified By:

CommentAstNode