public class JLiteral extends JExpr
Modifier and Type | Class and Description |
---|---|
static class |
JLiteral.LiteralType |
JExpr.AllocationExpr, JExpr.ArrayIndexExpr, JExpr.CastExpr
Constructor and Description |
---|
JLiteral()
Creates a new literal.
|
JLiteral(java.lang.Object aValue)
Creates a new literal with given value.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
createValue()
Creates the value.
|
protected java.lang.String |
getClassNameImpl()
Tries to resolve the class name for this node.
|
JLiteral.LiteralType |
getLiteralType()
Returns the Literal type (String, Number, Boolean, Null).
|
java.lang.String |
getNodeString()
Returns the part name.
|
java.lang.Object |
getValue()
Returns the value.
|
java.lang.String |
getValueString()
Returns the value string.
|
boolean |
isNull()
Returns whether this is null literal.
|
void |
setLiteralType(JLiteral.LiteralType aType)
Sets the literal type.
|
void |
setValueString(java.lang.String aString)
Sets the value string.
|
getParentClassRef, getParentExpr
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
public JLiteral()
public JLiteral(java.lang.Object aValue)
public JLiteral.LiteralType getLiteralType()
public void setLiteralType(JLiteral.LiteralType aType)
public boolean isNull()
public java.lang.Object getValue()
protected java.lang.Object createValue()
public java.lang.String getValueString()
public void setValueString(java.lang.String aString)
protected java.lang.String getClassNameImpl()
getClassNameImpl
in class JNode
public java.lang.String getNodeString()
getNodeString
in class JNode