de.unkrig.commons.text.expression
Class Scanner
java.lang.Object
de.unkrig.commons.text.expression.Scanner
public final class Scanner
- extends java.lang.Object
The scanner for the ExpressionEvaluator.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
stringScanner
public static StringScanner<Scanner.TokenType> stringScanner()
- Returns:
- A
StringScanner for the given Scanner.TokenType
decodeCharacterLiteral
public static java.lang.Character decodeCharacterLiteral(java.lang.String text)
throws ScanException
- Returns:
- E.g. a single quote if the
text is single quote, backslash, single quote, single quote
- Throws:
ScanException
decodeFloatingPointLiteral
public static java.lang.Object decodeFloatingPointLiteral(java.lang.String text)
- Returns:
- A
Double or a Float
decodeIntegerLiteral
public static java.lang.Object decodeIntegerLiteral(java.lang.String text)
throws ScanException
- Returns:
- A
Long or an Integer
- Throws:
ScanException
decodeStringLiteral
public static java.lang.String decodeStringLiteral(java.lang.String text)
throws ScanException
- Removes the double quotes and the escape sequences from the given string literal.
- Throws:
ScanException