net.sourceforge.pmd.lang.ast.Node, JavaNode, TypeNode, net.sourceforge.pmd.lang.symboltable.ScopedNodepublic class ASTLiteral extends AbstractJavaTypeNode
parserbeginColumn, beginLine, childIndex, children, endColumn, endLine, firstToken, id, lastToken, parent| Constructor | Description |
|---|---|
ASTLiteral(int id) |
|
ASTLiteral(JavaParser p,
int id) |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
getEscapedStringLiteral() |
Tries to reconstruct the original string literal.
|
double |
getValueAsDouble() |
|
float |
getValueAsFloat() |
|
int |
getValueAsInt() |
|
long |
getValueAsLong() |
|
boolean |
isCharLiteral() |
|
boolean |
isDoubleLiteral() |
Checks whether this literal describes a double.
|
boolean |
isFloatLiteral() |
|
boolean |
isIntLiteral() |
|
boolean |
isLongLiteral() |
Checks whether this literal is a long integer.
|
boolean |
isSingleCharacterStringLiteral() |
Returns true if this is a String literal with only one character.
|
boolean |
isStringLiteral() |
|
java.lang.Object |
jjtAccept(JavaParserVisitor visitor,
java.lang.Object data) |
Accept the visitor.
|
void |
setCharLiteral() |
|
void |
setFloatLiteral() |
|
void |
setIntLiteral() |
|
void |
setStringLiteral() |
childrenAccept, comment, comment, getScope, getXPathNodeName, jjtClose, jjtOpen, setScopegetType, getTypeDefinition, setType, setTypeDefinitionappendElement, findChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, getAsDocument, getBeginColumn, getBeginLine, getDataFlowNode, getEndColumn, getEndLine, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfType, getImage, getNthParent, getParentsOfType, getUserData, hasDecendantOfAnyType, hasDescendantMatchingXPath, hasDescendantOfAnyType, hasDescendantOfType, hasImageEqualTo, isFindBoundary, isSingleLine, jjtAddChild, jjtGetChild, jjtGetChildIndex, jjtGetFirstToken, jjtGetId, jjtGetLastToken, jjtGetNumChildren, jjtGetParent, jjtSetChildIndex, jjtSetFirstToken, jjtSetLastToken, jjtSetParent, remove, removeChildAtIndex, setDataFlowNode, setImage, setUserData, testingOnlySetBeginColumn, testingOnlySetBeginLine, testingOnlySetEndColumn, testingOnlySetEndLine, toStringfindChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, getAsDocument, getBeginColumn, getBeginLine, getDataFlowNode, getEndColumn, getEndLine, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfType, getImage, getNthParent, getParentsOfType, getUserData, getXPathNodeName, hasDescendantMatchingXPath, hasDescendantOfType, hasImageEqualTo, isFindBoundary, jjtAddChild, jjtClose, jjtGetChild, jjtGetChildIndex, jjtGetId, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetChildIndex, jjtSetParent, remove, removeChildAtIndex, setDataFlowNode, setImage, setUserDatapublic ASTLiteral(int id)
public ASTLiteral(JavaParser p, int id)
public java.lang.Object jjtAccept(JavaParserVisitor visitor, java.lang.Object data)
jjtAccept in interface JavaNodejjtAccept in class AbstractJavaNodepublic void setIntLiteral()
public boolean isIntLiteral()
public boolean isLongLiteral()
true if this literal is a longpublic void setFloatLiteral()
public boolean isFloatLiteral()
public boolean isDoubleLiteral()
true if this literal is a double.public int getValueAsInt()
public long getValueAsLong()
public float getValueAsFloat()
public double getValueAsDouble()
public void setCharLiteral()
public boolean isCharLiteral()
public void setStringLiteral()
public boolean isStringLiteral()
public java.lang.String getEscapedStringLiteral()
public boolean isSingleCharacterStringLiteral()
Copyright © 2002–2018 PMD. All rights reserved.