Class ASTLiteralExpression
-
- All Implemented Interfaces:
-
net.sourceforge.pmd.lang.apex.ast.ApexNode
,net.sourceforge.pmd.lang.ast.Node
,net.sourceforge.pmd.lang.ast.impl.GenericNode
,net.sourceforge.pmd.reporting.Reportable
public final class ASTLiteralExpression extends AbstractApexNode.Single<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enum
ASTLiteralExpression.LiteralType
-
Field Summary
Fields Modifier and Type Field Description public final static Comparator<Node>
COORDS_COMPARATOR
-
Method Summary
Modifier and Type Method Description ASTLiteralExpression.LiteralType
getLiteralType()
boolean
isString()
boolean
isBoolean()
boolean
isInteger()
boolean
isDouble()
boolean
isLong()
boolean
isDecimal()
boolean
isNull()
String
getImage()
String
getName()
Returns the name of this literal when it is labeled in an object initializer with named arguments (ASTNewKeyValueObjectExpression). -
Methods inherited from class net.sourceforge.pmd.lang.apex.ast.AbstractApexNode.Single
hasRealLoc
-
Methods inherited from class net.sourceforge.pmd.lang.apex.ast.AbstractApexNode
acceptVisitor, getDefiningType, getRoot, getTextRegion, getXPathNodeName
-
Methods inherited from class net.sourceforge.pmd.lang.ast.impl.AbstractNode
children, firstChild, getChild, getIndexInParent, getNumChildren, getParent, getUserMap, toString
-
Methods inherited from class net.sourceforge.pmd.lang.ast.impl.GenericNode
ancestors, ancestorsOrSelf, asStream, descendants, descendantsOrSelf, getFirstChild, getLastChild, getNextSibling, getPreviousSibling
-
Methods inherited from class net.sourceforge.pmd.lang.ast.Node
acceptVisitor, ancestors, ancestors, ancestorsOrSelf, asStream, children, children, compareLocation, descendants, descendants, descendantsOrSelf, getAstInfo, getBeginColumn, getBeginLine, getChild, getEndColumn, getEndLine, getFirstChild, getLanguageVersion, getLastChild, getNextSibling, getParent, getPreviousSibling, getReportLocation, getRoot, getTextDocument, getTextRegion, getXPathAttributesIterator, getXPathNodeName, hasImageEqualTo, isFindBoundary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getLiteralType
ASTLiteralExpression.LiteralType getLiteralType()
-
isString
boolean isString()
-
isBoolean
boolean isBoolean()
-
isInteger
boolean isInteger()
-
isDouble
boolean isDouble()
-
isLong
boolean isLong()
-
isDecimal
boolean isDecimal()
-
isNull
boolean isNull()
-
getName
String getName()
Returns the name of this literal when it is labeled in an object initializer with named arguments (ASTNewKeyValueObjectExpression).
For example, in the Apex code
, the ASTLiteralExpression corresponding tonew X(a = 1, b = 2)
2
will have thename
"b
".
-
-
-
-