public final class ExpressionUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static Expression |
equalize(Expression expression,
Type target)
Prepare expression to be in the same type as the requested type (supports autocasts)
|
static Object[] |
evaluate(ProcessStack stack,
Object instance,
Expression... expressions)
Evaluates the given expressions and returns values stored in the array in the preserved order
|
static <T> T |
evaluateConstExpression(Expression expression)
Evaluates static expression (constexpr) - expression that does not relay on stack and instance
|
public static <T> T evaluateConstExpression(Expression expression)
T - generic type of resultexpression - the expression to evaluatepublic static Object[] evaluate(ProcessStack stack, Object instance, Expression... expressions) throws Exception
stack - the stack to useinstance - the instance to useexpressions - the expressions to evaluateException - if something happenpublic static Expression equalize(Expression expression, Type target)
expression - the expression to equalizetarget - the target typeCopyright © 2020. All rights reserved.