public class ExpressionParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
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 |
PREF_HEIGHT
The identifier evaluating to the preferred height in pixels of the
current dialog.
|
private static java.lang.String |
PREF_WIDTH
The identifier evaluating to the preferred width in pixels of the current
dialog.
|
private static java.lang.String |
WIDTH
The identifier evaluating to the width in pixels of the current
resolution.
|
Modifier | Constructor and Description |
---|---|
private |
ExpressionParser()
Private constructor to prevent instantiation.
|
Modifier and Type | Method and Description |
---|---|
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.
|
@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 PREF_HEIGHT
@NotNull private static final java.lang.String PREF_WIDTH
@NotNull private static final java.lang.String WIDTH
private ExpressionParser()
@NotNull public static Expression parseExpression(@NotNull java.lang.String str) throws java.io.IOException
str
- the integer constant string to parsejava.io.IOException
- if a parsing error occurspublic static int parseInt(@NotNull java.lang.String str) throws java.io.IOException
str
- the integer constant string to parsejava.io.IOException
- if a parsing error occurs@NotNull private static Expression parseIntegerConstant(@NotNull java.lang.String str)
str
- the stringjava.lang.NumberFormatException
- if the string cannot be parsed