public class ExpressionUtils
extends java.lang.Object
Constructor and Description |
---|
ExpressionUtils() |
Modifier and Type | Method and Description |
---|---|
static Code |
compile(java.lang.String expression) |
static CodeBuilder |
createCodeBuilder() |
static Compiler |
createCompiler() |
static java.io.File |
createDynamicFile(ExpressionBuilder.Value builder) |
static java.io.File |
createDynamicFile(java.lang.String expression) |
static MutableSymbolTable |
createEmptySymbolTable() |
static Expression |
createExpression() |
static Expression |
createExpression(Expression expression) |
static Expression |
createExpression(java.lang.String phrase) |
static ExpressionBuilder |
createExpressionBuilder() |
static Expression |
createExpressionFromJson(JsonObject json) |
static Expression |
createExpressionFromJSON(java.lang.String json)
Deprecated.
Use createExpressionFromJson
|
static Interpreter |
createInterpreter() |
static Optimizer |
createOptimizer() |
static Script |
createScript(byte[] bytes,
java.lang.String name) |
static MutableSymbolTable |
createSymbolTable() |
static MutableSymbolTable |
createSymbolTable(DynObject obj) |
static MutableSymbolTable |
createSymbolTable(java.lang.String name,
DynObject obj) |
static Expression |
defaultIfEmpty(Expression expression,
Expression defaultValue) |
static Expression |
defaultIfPhraseEmpty(Expression expression,
Expression defaultValue) |
static Expression |
defaultNullIfEmpty(Expression expression) |
static Expression |
defaultNullIfPhraseEmpty(Expression expression) |
static java.lang.Object |
evaluate(java.lang.String expression) |
static java.lang.Object |
evaluate(SymbolTable symbolTable,
Code code) |
static java.lang.Object |
evaluate(SymbolTable symbolTable,
java.lang.String expression) |
static java.lang.String |
evaluateDynamicText(java.lang.String source) |
static java.lang.String |
evaluateDynamicText(SymbolTable symbolTable,
java.lang.String source) |
static java.io.File |
evaluateFilename(java.io.File source) |
static java.io.File |
evaluateFilename(SymbolTable symbolTable,
java.io.File source) |
static java.net.URL |
evaluateURL(SymbolTable symbolTable,
java.net.URL source) |
static java.net.URL |
evaluateURL(java.net.URL source) |
static ExpressionBuilder.Value |
getHostExpressionValue(ExpressionBuilder.Function hostExpression,
ExpressionBuilder expbuilder) |
static ExpressionBuilder.Value |
getHostExpressionValue(ExpressionBuilder.Function hostExpression,
ExpressionBuilder expbuilder,
SymbolTable symboltable) |
static java.lang.String |
getPhrase(Expression expression) |
static Script |
getScript(ResourcesStorage resources,
java.lang.String resourceName) |
static boolean |
isDynamicFilename(java.io.File source) |
static boolean |
isDynamicText(java.lang.String source) |
static boolean |
isDynamicURL(java.net.URL source) |
static boolean |
isEmpty(Expression expression) |
static boolean |
isPhraseEmpty(Expression expression) |
static boolean |
isValidIdentifier(java.lang.String name) |
static Code |
optimize(SymbolTable symbolTable,
Code code) |
static boolean |
parseBoolean(java.lang.String expression) |
static boolean |
parseBoolean(SymbolTable symbolTable,
java.lang.String expression,
boolean defaultValue) |
static java.awt.Color |
parseColor(java.lang.String expression) |
static java.awt.Color |
parseColor(SymbolTable symbolTable,
java.lang.String expression,
java.awt.Color defaultValue) |
static double |
parseDouble(java.lang.String s) |
static double |
parseDouble(SymbolTable symbolTable,
java.lang.String expression,
double defaultValue) |
static int |
parseInt(java.lang.String s) |
static int |
parseInt(SymbolTable symbolTable,
java.lang.String expression,
int defaultValue) |
static long |
parseLong(java.lang.String s) |
static long |
parseLong(SymbolTable symbolTable,
java.lang.String expression,
long defaultValue) |
static java.lang.String |
repr(java.lang.Object value) |
static ExpressionBuilder.Value |
resolveHostExpressions(ExpressionBuilder.Value statement,
SymbolTable symbolTable) |
static Expression |
resolveHostExpressions(Expression expression,
SymbolTable symbolTable) |
static java.lang.String |
surroundByDynamicTextTag(java.lang.String source) |
static java.lang.String |
surroundByDynamicTextTag(java.lang.String source,
boolean insert) |
static java.lang.String |
toString(Code code) |
static java.lang.String |
toString(Code code,
Formatter formatter) |
static java.lang.String |
toString(ExpressionBuilder.Value value) |
static java.lang.String |
toString(ExpressionBuilder.Value value,
Formatter formatter) |
public static boolean isEmpty(Expression expression)
public static boolean isPhraseEmpty(Expression expression)
public static Expression defaultIfEmpty(Expression expression, Expression defaultValue)
public static Expression defaultNullIfEmpty(Expression expression)
public static Expression defaultIfPhraseEmpty(Expression expression, Expression defaultValue)
public static Expression defaultNullIfPhraseEmpty(Expression expression)
public static Expression createExpression()
public static Expression createExpression(java.lang.String phrase)
public static Expression createExpression(Expression expression)
public static ExpressionBuilder createExpressionBuilder()
public static Code compile(java.lang.String expression)
public static java.lang.Object evaluate(java.lang.String expression)
public static java.lang.Object evaluate(SymbolTable symbolTable, java.lang.String expression)
public static java.lang.Object evaluate(SymbolTable symbolTable, Code code)
public static Code optimize(SymbolTable symbolTable, Code code)
public static java.lang.String toString(ExpressionBuilder.Value value, Formatter formatter)
public static java.lang.String toString(ExpressionBuilder.Value value)
public static java.lang.String toString(Code code)
public static Expression createExpressionFromJSON(java.lang.String json)
json
- public static Expression createExpressionFromJson(JsonObject json)
public static MutableSymbolTable createSymbolTable()
public static MutableSymbolTable createSymbolTable(DynObject obj)
public static MutableSymbolTable createSymbolTable(java.lang.String name, DynObject obj)
public static java.lang.String surroundByDynamicTextTag(java.lang.String source)
public static java.lang.String surroundByDynamicTextTag(java.lang.String source, boolean insert)
public static boolean isDynamicText(java.lang.String source)
public static java.lang.String evaluateDynamicText(java.lang.String source)
public static java.lang.String evaluateDynamicText(SymbolTable symbolTable, java.lang.String source)
public static java.io.File evaluateFilename(java.io.File source)
public static java.net.URL evaluateURL(java.net.URL source)
public static boolean isDynamicFilename(java.io.File source)
public static boolean isDynamicURL(java.net.URL source)
public static java.io.File createDynamicFile(ExpressionBuilder.Value builder)
public static java.io.File createDynamicFile(java.lang.String expression)
public static java.io.File evaluateFilename(SymbolTable symbolTable, java.io.File source)
public static java.net.URL evaluateURL(SymbolTable symbolTable, java.net.URL source)
public static int parseInt(java.lang.String s) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public static long parseLong(java.lang.String s) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public static double parseDouble(java.lang.String s) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public static Compiler createCompiler()
public static Interpreter createInterpreter()
public static Optimizer createOptimizer()
public static java.lang.String repr(java.lang.Object value)
public static CodeBuilder createCodeBuilder()
public static boolean parseBoolean(SymbolTable symbolTable, java.lang.String expression, boolean defaultValue)
public static boolean parseBoolean(java.lang.String expression)
public static int parseInt(SymbolTable symbolTable, java.lang.String expression, int defaultValue)
public static long parseLong(SymbolTable symbolTable, java.lang.String expression, long defaultValue)
public static double parseDouble(SymbolTable symbolTable, java.lang.String expression, double defaultValue)
public static java.awt.Color parseColor(SymbolTable symbolTable, java.lang.String expression, java.awt.Color defaultValue)
public static java.awt.Color parseColor(java.lang.String expression)
public static boolean isValidIdentifier(java.lang.String name)
public static Expression resolveHostExpressions(Expression expression, SymbolTable symbolTable)
public static ExpressionBuilder.Value resolveHostExpressions(ExpressionBuilder.Value statement, SymbolTable symbolTable)
public static ExpressionBuilder.Value getHostExpressionValue(ExpressionBuilder.Function hostExpression, ExpressionBuilder expbuilder)
public static ExpressionBuilder.Value getHostExpressionValue(ExpressionBuilder.Function hostExpression, ExpressionBuilder expbuilder, SymbolTable symboltable)
public static java.lang.String getPhrase(Expression expression)
public static Script createScript(byte[] bytes, java.lang.String name)
public static Script getScript(ResourcesStorage resources, java.lang.String resourceName)
public static MutableSymbolTable createEmptySymbolTable()