public class BaseExpressionEvaluator extends AbstractEvaluator implements ExpressionEvaluator, Cloneable, SupportToExpression, SupportToSymbolTable
EvaluatorWithDescriptions.Description| Constructor and Description |
|---|
BaseExpressionEvaluator(Expression expression) |
BaseExpressionEvaluator(java.lang.String source) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSymbolTable(SymbolTable symbolTable) |
Evaluator |
clone()
Creates a copy of the object.
|
java.lang.Object |
evaluate(EvaluatorData data)
Evaluate with the data passed as parameter.
|
void |
fromJson(JsonObject json) |
EvaluatorWithDescriptions.Description[] |
getAvailableFunctions() |
EvaluatorWithDescriptions.Description[] |
getAvailableOperators() |
java.lang.String |
getDescription()
Get a description of the action performed with the evaluator.
|
EvaluatorFieldsInfo |
getFieldsInfo()
Get information about fiels used in the evaluator.
|
java.lang.String |
getName()
Get the symbolic name of the evaluator.
|
java.lang.String |
getSQL()
Get a SQL representation of the evaluator.
|
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
static void |
registerPersistence() |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
Expression |
toExpression() |
JsonObjectBuilder |
toJsonBuilder() |
SymbolTable |
toSymbolTable() |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittoJson, toJson, toJsonBuildercloneQuietly, cloneQuietlypublic BaseExpressionEvaluator(java.lang.String source)
public BaseExpressionEvaluator(Expression expression)
public java.lang.String getName()
Evaluatorpublic java.lang.String getDescription()
EvaluatorgetDescription in interface EvaluatorgetDescription in class AbstractEvaluatorpublic java.lang.String getSQL()
EvaluatorgetSQL in interface ExpressionEvaluatorgetSQL in interface EvaluatorgetSQL in class AbstractEvaluatorpublic Expression toExpression()
toExpression in interface SupportToExpressionpublic SymbolTable toSymbolTable()
toSymbolTable in interface SupportToSymbolTablepublic java.lang.Object evaluate(EvaluatorData data) throws EvaluatorException
Evaluatorevaluate in interface EvaluatorEvaluatorException - if an issue is found while evaluating.
The subclass EvaluatorParseException is used to indicate
a problem while parsing (malformed expression) rather than a
problem while evaluating.public EvaluatorFieldsInfo getFieldsInfo()
EvaluatorgetFieldsInfo in interface EvaluatorgetFieldsInfo in class AbstractEvaluatorpublic EvaluatorWithDescriptions.Description[] getAvailableOperators()
getAvailableOperators in interface EvaluatorWithDescriptionspublic EvaluatorWithDescriptions.Description[] getAvailableFunctions()
getAvailableFunctions in interface EvaluatorWithDescriptionspublic Evaluator clone() throws java.lang.CloneNotSupportedException
Cloneableclone in class java.lang.Objectjava.lang.CloneNotSupportedException - if the instance of the object cannot
be cloned. As this is extending Cloneable so its sure
it implements it, so this exception may be used for problems on specific
object instances.Object#clone()}.public void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentPersistenceExceptionpublic void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentPersistenceExceptionpublic static void registerPersistence()
public void addSymbolTable(SymbolTable symbolTable)
addSymbolTable in interface ExpressionEvaluatorpublic void fromJson(JsonObject json)
fromJson in interface SupportFromJsonpublic JsonObjectBuilder toJsonBuilder()
toJsonBuilder in interface SupportToJson