public abstract class AbstractExpression extends Object implements Expression
Expression
which implements the "evaluateTo*()
" convenience methods.FALSE, NULL, TRUE
Constructor and Description |
---|
AbstractExpression() |
Modifier and Type | Method and Description |
---|---|
Object |
evaluate(Object... variableNamesAndValues)
Computes the value of the expression.
|
<T> T |
evaluateTo(Class<T> targetType,
Object... variableNamesAndValues) |
<T> T |
evaluateTo(Mapping<String,?> variables,
Class<T> targetType) |
boolean |
evaluateToBoolean(Mapping<String,?> variables) |
boolean |
evaluateToBoolean(Object... variableNamesAndValues) |
<T> T |
evaluateToPrimitive(Class<T> targetType,
Object... variableNamesAndValues) |
<T> T |
evaluateToPrimitive(Mapping<String,?> variables,
Class<T> targetType) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
evaluate
@Nullable public Object evaluate(Object... variableNamesAndValues) throws EvaluationException
Expression
evaluate
in interface Expression
variableNamesAndValues
- Pairs of variable names and values; the even elements' type must be String
, the odd elements' type must be String
, Integer
, Boolean
, any other Object
, or null
.String
, Integer
, Boolean
, any other {link Object}, or
null
EvaluationException
- A problem occurred during evaluation, e.g. any array element access was attempted
and the index value could not be converted to int
@Nullable public final <T> T evaluateTo(Mapping<String,?> variables, Class<T> targetType) throws EvaluationException
evaluateTo
in interface Expression
EvaluationException
Expression.evaluate(Mapping)
,
ExpressionEvaluator.to(Object, Class)
@Nullable public final <T> T evaluateTo(Class<T> targetType, Object... variableNamesAndValues) throws EvaluationException
evaluateTo
in interface Expression
EvaluationException
evaluate(Object...)
,
ExpressionEvaluator.to(Object, Class)
public final <T> T evaluateToPrimitive(Mapping<String,?> variables, Class<T> targetType) throws EvaluationException
evaluateToPrimitive
in interface Expression
EvaluationException
ExpressionEvaluator.toPrimitive(Object, Class)
public final <T> T evaluateToPrimitive(Class<T> targetType, Object... variableNamesAndValues) throws EvaluationException
evaluateToPrimitive
in interface Expression
EvaluationException
ExpressionEvaluator.toPrimitive(Object, Class)
public final boolean evaluateToBoolean(Mapping<String,?> variables) throws EvaluationException
evaluateToBoolean
in interface Expression
EvaluationException
ExpressionEvaluator.toBoolean(Object)
public final boolean evaluateToBoolean(Object... variableNamesAndValues) throws EvaluationException
evaluateToBoolean
in interface Expression
EvaluationException
ExpressionEvaluator.toBoolean(Object)
Copyright © 2018 Arno Unkrig. All rights reserved.