Class JLiteral
- java.lang.Object
-
- com.inductiveautomation.snap.javatree.JNode
-
- com.inductiveautomation.snap.javatree.JExpr
-
- com.inductiveautomation.snap.javatree.JLiteral
-
public class JLiteral extends JExpr
A JExpr subclass for literals.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJLiteral.LiteralType-
Nested classes/interfaces inherited from class com.inductiveautomation.snap.javatree.JExpr
JExpr.AllocationExpr, JExpr.ArrayIndexExpr, JExpr.CastExpr
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.ObjectcreateValue()Creates the value.protected java.lang.StringgetClassNameImpl()Tries to resolve the class name for this node.JLiteral.LiteralTypegetLiteralType()Returns the Literal type (String, Number, Boolean, Null).java.lang.StringgetNodeString()Returns the part name.java.lang.ObjectgetValue()Returns the value.java.lang.StringgetValueString()Returns the value string.booleanisNull()Returns whether this is null literal.voidsetLiteralType(JLiteral.LiteralType aType)Sets the literal type.voidsetValueString(java.lang.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
-
-
-
-
Method Detail
-
getLiteralType
public JLiteral.LiteralType getLiteralType()
Returns the Literal type (String, Number, Boolean, Null).
-
setLiteralType
public void setLiteralType(JLiteral.LiteralType aType)
Sets the literal type.
-
isNull
public boolean isNull()
Returns whether this is null literal.
-
getValue
public java.lang.Object getValue()
Returns the value.
-
createValue
protected java.lang.Object createValue()
Creates the value.
-
getValueString
public java.lang.String getValueString()
Returns the value string.
-
setValueString
public void setValueString(java.lang.String aString)
Sets the value string.
-
getClassNameImpl
protected java.lang.String getClassNameImpl()
Tries to resolve the class name for this node.- Overrides:
getClassNameImplin classJNode
-
getNodeString
public java.lang.String getNodeString()
Returns the part name.- Overrides:
getNodeStringin classJNode
-
-