java.lang.Objectcom.realtime.crossfire.jxclient.skin.io.ExpressionParser
public class ExpressionParser
Parser for integer expressions.
| Field Summary | |
|---|---|
private static java.lang.String |
HEIGHT
The identifier evaluating to the height in pixels of the current resolution. |
private static java.util.regex.Pattern |
PATTERN_EXPR
Pattern to parse integer constants. |
private static java.lang.String |
WIDTH
The identifier evaluating to the width in pixels of the current resolution. |
| Constructor Summary | |
|---|---|
private |
ExpressionParser()
Private constructor to prevent instantiation. |
| Method Summary | |
|---|---|
static Expression |
parseExpression(java.lang.String str)
Parses an integer constant. |
static int |
parseInt(java.lang.String str)
Parses an integer constant. |
private static Expression |
parseIntegerConstant(java.lang.String str)
Parses an integer constant string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@NotNull private static final java.lang.String HEIGHT
@NotNull private static final java.util.regex.Pattern PATTERN_EXPR
@NotNull private static final java.lang.String WIDTH
| Constructor Detail |
|---|
private ExpressionParser()
| Method Detail |
|---|
@NotNull
public static Expression parseExpression(@NotNull
java.lang.String str)
throws java.io.IOException
str - the integer constant string to parse
java.io.IOException - if a parsing error occurs
public static int parseInt(@NotNull
java.lang.String str)
throws java.io.IOException
str - the integer constant string to parse
java.io.IOException - if a parsing error occurs
@NotNull
private static Expression parseIntegerConstant(@NotNull
java.lang.String str)
str - the string
java.lang.NumberFormatException - if the string cannot be parsed