Skip to content

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

Class JsonCommentNode

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

All Implemented Interfaces:
    ScalarAstNode<JsonNode>, CommentAstNode


public class JsonCommentNode
extends JsonNode

Constructor Summary

Constructor Description
JsonCommentNode(int line, int column, URI uri, String rawValue, String stringValue, boolean multiLine)

Method Summary

Modifier and Type Method Description
public String getContent()
public void setQuoteStyle(QuoteStyle style)
public QuoteStyle getQuoteStyle()
public List<JsonNode> getChildren()
public List<CommentAstNode> getComments()
public String getRaw() 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 void setPrimitive(Object value)
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()


setQuoteStyle

public void setQuoteStyle(QuoteStyle style)

Specified By:

ScalarAstNode


getQuoteStyle

public QuoteStyle getQuoteStyle()

Specified By:

ScalarAstNode


getChildren

public List<JsonNode> getChildren()


getComments

public List<CommentAstNode> getComments()


getRaw

public String getRaw()

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


setPrimitive

public void setPrimitive(Object value)

Specified By:

ScalarAstNode


asString

public String asString()

Specified By:

CommentAstNode


isMultiLine

public boolean isMultiLine()

Specified By:

CommentAstNode