com.google.sitebricks.compiler
Interface EvaluatorCompiler
- All Known Implementing Classes:
- MvelEvaluatorCompiler
public interface EvaluatorCompiler
- Author:
- Dhanji R. Prasanna (dhanji@gmail.com)
compile
Evaluator compile(String expression)
throws ExpressionCompileException
- Parameters:
expression - An expression to compile against this compiler (and context class)
- Returns:
- Returns An evaluator that can execute the expression against the context class and a
real instance of data.
- Throws:
ExpressionCompileException - If there is a problem compiling the expression.
tokenizeAndCompile
List<Token> tokenizeAndCompile(String template)
throws ExpressionCompileException
- Parameters:
template - A String template with embedded EL expressions to convert into a list of
evaluable tokens. These tokens evaluate against given data or simply render plain text as
appropriate. Performs a compile of each expression against the context class of this
EvaluatorCompiler.
- Returns:
- Returns the egress type of the entire expression chain
- Throws:
ExpressionCompileException - If there is a problem
compiling the expression.
resolveEgressType
Type resolveEgressType(String expression)
throws ExpressionCompileException
- Parameters:
expression - An expression to compile against this compiler (and context class)
- Returns:
- Returns the egress type of the entire expression chain
- Throws:
ExpressionCompileException - If there is a problem
compiling the expression.
isWritable
boolean isWritable(String property)
throws ExpressionCompileException
- Parameters:
property - A property of this class to test.
- Returns:
- True if the property has a setter or reasonable alternative that can
be written to by the evaluator produced by this compiler.
- Throws:
ExpressionCompileException
Copyright © 2014. All rights reserved.