TYPE
- The type of the result returned by the execution of the expressionpublic static final class EvalFactory.Eval<TYPE>
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
call(java.lang.String expression)
Executes the given expression and process its result using the given consumer.
|
void |
call(java.lang.String expression,
IConsumer<TYPE> consumer)
Executes the given expression and process its result using the given consumer.
|
EvalFactory.Eval<TYPE> |
defaultValue(TYPE value)
Indicates the value to use by default if the result of the evaluation of the expression is null.
|
TYPE |
evaluate(java.lang.String expression)
Executes the given expression.
|
EvalFactory.Eval<TYPE> |
logIfBlank(org.eclipse.emf.ecore.EAttribute attribute)
Indicates that an error should be logged using the given EAttribute if the expression to execute is blank.
|
<E> EvalFactory.Eval<E> |
logIfInvalidType(java.lang.Class<E> expectedType)
Indicates that the result should have the same type as the given class.
|
public EvalFactory.Eval<TYPE> logIfBlank(org.eclipse.emf.ecore.EAttribute attribute)
attribute
- The EAttribute containing the expression to executeEvalFactory.Eval
public <E> EvalFactory.Eval<E> logIfInvalidType(java.lang.Class<E> expectedType)
E
- The expected type of the execution of the expressionexpectedType
- The expected typeEvalFactory.Eval
public EvalFactory.Eval<TYPE> defaultValue(TYPE value)
value
- The default valueEvalFactory.Eval
public void call(java.lang.String expression)
expression
- The expressionpublic void call(java.lang.String expression, IConsumer<TYPE> consumer)
expression
- The expressionconsumer
- The consumerpublic TYPE evaluate(java.lang.String expression)
expression
- The expression