Class JLiteral
java.lang.Object
com.inductiveautomation.snap.javatree.JNode
com.inductiveautomation.snap.javatree.JExpr
com.inductiveautomation.snap.javatree.JLiteral
A JExpr subclass for literals.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.inductiveautomation.snap.javatree.JExpr
JExpr.AllocationExpr, JExpr.ArrayIndexExpr, JExpr.CastExpr
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
Creates the value.protected String
Tries to resolve the class name for this node.Returns the Literal type (String, Number, Boolean, Null).Returns the part name.getValue()
Returns the value.Returns the value string.boolean
isNull()
Returns whether this is null literal.void
Sets the literal type.void
setValueString
(String aString) Sets the value string.Methods inherited from class com.inductiveautomation.snap.javatree.JExpr
getParentClassRef, getParentExpr
Methods inherited from class com.inductiveautomation.snap.javatree.JNode
addChild, buildChildren, getBlock, getChild, getChildCount, getChildren, getClassLoader, getClassName, getClassRef, getClassRefImpl, getEnclosingClassDecl, getEnclosingMemberDecl, getEnclosingMethodDecl, getEnd, getEndToken, getFile, getJClass, getLineIndex, getName, getNameImpl, getNodeAtCharIndex, getNodeFields, getNodeFieldsImpl, getNodeParents, getNodePath, getOthers, getParent, getParent, getReferencedClasses, getReferencedClassNames, getReferencedClassNames, getReferencedClassNames, getStart, getStartToken, getString, getVariableDecl, getVariableDeclInside, getVariableDecls, isBlock, setClassName, setClassRef, setEndToken, setJClass, setParent, setStartToken, toString
-
Constructor Details
-
JLiteral
public JLiteral()Creates a new literal. -
JLiteral
Creates a new literal with given value.
-
-
Method Details
-
getLiteralType
Returns the Literal type (String, Number, Boolean, Null). -
setLiteralType
Sets the literal type. -
isNull
public boolean isNull()Returns whether this is null literal. -
getValue
Returns the value. -
createValue
Creates the value. -
getValueString
Returns the value string. -
setValueString
Sets the value string. -
getClassNameImpl
Tries to resolve the class name for this node.- Overrides:
getClassNameImpl
in classJNode
-
getNodeString
Returns the part name.- Overrides:
getNodeString
in classJNode
-