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, wait
toJson, toJson, toJsonBuilder
cloneQuietly, cloneQuietly
public BaseExpressionEvaluator(java.lang.String source)
public BaseExpressionEvaluator(Expression expression)
public java.lang.String getName()
Evaluator
public java.lang.String getDescription()
Evaluator
getDescription
in interface Evaluator
getDescription
in class AbstractEvaluator
public java.lang.String getSQL()
Evaluator
getSQL
in interface ExpressionEvaluator
getSQL
in interface Evaluator
getSQL
in class AbstractEvaluator
public Expression toExpression()
toExpression
in interface SupportToExpression
public SymbolTable toSymbolTable()
toSymbolTable
in interface SupportToSymbolTable
public java.lang.Object evaluate(EvaluatorData data) throws EvaluatorException
Evaluator
evaluate
in interface Evaluator
EvaluatorException
- 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()
Evaluator
getFieldsInfo
in interface Evaluator
getFieldsInfo
in class AbstractEvaluator
public EvaluatorWithDescriptions.Description[] getAvailableOperators()
getAvailableOperators
in interface EvaluatorWithDescriptions
public EvaluatorWithDescriptions.Description[] getAvailableFunctions()
getAvailableFunctions
in interface EvaluatorWithDescriptions
public Evaluator clone() throws java.lang.CloneNotSupportedException
Cloneable
clone
in class java.lang.Object
java.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
Persistent
saveToState
in interface Persistent
PersistenceException
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException
public static void registerPersistence()
public void addSymbolTable(SymbolTable symbolTable)
addSymbolTable
in interface ExpressionEvaluator
public void fromJson(JsonObject json)
fromJson
in interface SupportFromJson
public JsonObjectBuilder toJsonBuilder()
toJsonBuilder
in interface SupportToJson