|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jec.ExpressionCompiler
This class precompiles bean expressions so their evaluation becomes faster.
Constructor Summary | |
ExpressionCompiler(boolean throwExceptions)
Creates a new ExpressionCompiler that uses the specified ObjectConverter |
Method Summary | |
void |
addFunction(java.lang.String name,
Function function)
Adds a new function to the compiler |
void |
addOperator(java.lang.String name,
java.lang.Class operatorClass)
Adds a new function to the compiler |
Operator |
compileOperator(java.lang.String expr)
Compiles an expression into an operator |
static ExpressionCompiler |
getDefaultInstance(boolean throwExceptions)
Returns an ExpressionCompiler with default operators and
functions. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ExpressionCompiler(boolean throwExceptions)
Method Detail |
public static ExpressionCompiler getDefaultInstance(boolean throwExceptions)
Returns an ExpressionCompiler
with default operators and
functions. It is a convenience method that creates a new ExpressionCompiler
and adds all the basic operators and functions with compehensive names.
The complete list of added operators and functions is:
AvgOperator
CountOperator
GroupByOperator
MaxOperator
MinOperator
OrderByOperator
SelectOperator
SumOperator
TableOperator
CurrencyOperator
DateFunction
with "dd/MM/yyyy"PercentOperator
throwExceptions
-
public void addOperator(java.lang.String name, java.lang.Class operatorClass)
public void addFunction(java.lang.String name, Function function)
public Operator compileOperator(java.lang.String expr) throws ParseException
ParseException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |