public class IntLiteral extends AbstractIntegerLiteral
| Modifier and Type | Field and Description | 
|---|---|
private static long | 
MAX_UINT
A constant holding the maximum valid value as if an int was interpreted unsigned:
 232-1 
 | 
private int | 
value
The actual value of the literal. 
 | 
private java.lang.String | 
valueStr
Textual representation of the value as a decimal number. 
 | 
| Constructor and Description | 
|---|
IntLiteral(ExtList children,
          java.lang.String valStr)
Constructor for Recoder2KeY transformation. 
 | 
IntLiteral(int value)
Creates a new IntLiteral representing the given int. 
 | 
IntLiteral(java.lang.String valStr)
Creates a new IntLiteral from the given String. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
KeYJavaType | 
getKeYJavaType(Services javaServ)
retrieves the literal's type 
 | 
long | 
getValue()  | 
java.lang.String | 
getValueString()  | 
protected int | 
parseFromString(java.lang.String sourceStr)
Parses the String and extracts the actual value of the literal. 
 | 
void | 
prettyPrint(PrettyPrinter p)
Pretty printing the source element. 
 | 
void | 
visit(Visitor v)
calls the corresponding method of a visitor in order to
 perform some action/transformation on this element 
 | 
computeHashCode, equals, equalsModRenaming, getLDTName, representsDecLiteral, toStringgetKeYJavaType, matchgetComments, hashCode, prettyPrintMain, reuseSignaturegetEndPosition, getFirstElement, getFirstElementIncludingBlocks, getLastElement, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetCommentsgetEndPosition, getFirstElement, getFirstElementIncludingBlocks, getLastElement, getPositionInfo, getRelativePosition, getStartPositionprivate static final long MAX_UINT
private final java.lang.String valueStr
private final int value
public IntLiteral(int value)
value - the int value represented by the literalpublic IntLiteral(java.lang.String valStr)
valStr - the String that contains the literaljava.lang.NumberFormatException - if the given String does not represent a syntactically valid
          literal or represents a value out of int rangepublic IntLiteral(ExtList children, java.lang.String valStr)
children - the children of this AST element as KeY classes, may contain: CommentsvalStr - the value of the literaljava.lang.NumberFormatException - if the given String does not represent a syntactically valid
          literal or represents a value out of int rangepublic void visit(Visitor v)
SourceElementv - the Visitorpublic void prettyPrint(PrettyPrinter p) throws java.io.IOException
JavaSourceElementprettyPrint in interface SourceElementprettyPrint in class JavaProgramElementp - a pretty printer.java.io.IOException - occasionally thrown.public KeYJavaType getKeYJavaType(Services javaServ)
LiteralgetKeYJavaType in class LiteraljavaServ - the Services offering access to the Java modelpublic long getValue()
getValue in class AbstractIntegerLiteralpublic java.lang.String getValueString()
getValueString in class AbstractIntegerLiteralprotected int parseFromString(java.lang.String sourceStr)
                       throws java.lang.NumberFormatException
sourceStr - the String containing the valuejava.lang.NumberFormatException - if the given String does not represent a syntactically valid
          literal or represents a value out of int range