Package org.sonar.python.tree
Class NumericLiteralImpl
- java.lang.Object
-
- org.sonar.python.tree.PyTree
-
- org.sonar.python.tree.NumericLiteralImpl
-
- All Implemented Interfaces:
Expression,NumericLiteral,Tree
public class NumericLiteralImpl extends PyTree implements NumericLiteral
-
-
Field Summary
-
Fields inherited from class org.sonar.python.tree.PyTree
firstToken, lastToken
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(TreeVisitor visitor)List<Tree>computeChildren()Tree.KindgetKind()InferredTypetype()longvalueAsLong()StringvalueAsString()-
Methods inherited from class org.sonar.python.tree.PyTree
children, firstToken, is, lastToken, parent, setParent
-
-
-
-
Method Detail
-
accept
public void accept(TreeVisitor visitor)
-
valueAsLong
public long valueAsLong()
- Specified by:
valueAsLongin interfaceNumericLiteral- Returns:
- the value of this literal as a long.
-
valueAsString
public String valueAsString()
- Specified by:
valueAsStringin interfaceNumericLiteral- Returns:
- the token value of this literal.
-
type
public InferredType type()
- Specified by:
typein interfaceExpression
-
-