|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.base.apps.beans.util.Evaluator
public class Evaluator
A utility to evaluate an Expr against a bean. This class
is used to filter rows in or add dynamic columns to a
BoundTable.
| Field Summary | |
|---|---|
JXPathContext |
mCtx
|
| Constructor Summary | |
|---|---|
|
Evaluator()
|
protected |
Evaluator(Object bean)
Constructs an Expr visitor. |
| Method Summary | |
|---|---|
boolean |
assignValue(CharSequence expr,
Object value)
|
boolean |
assignValue(CharSequence expr,
Object value,
Object bean)
|
void |
compileExpr(CharSequence expr)
|
static Object |
eval(Object bean,
Expr expr)
Evaluates an Expr against a bean. |
Object |
evaluate(Expr expr)
Evaluates the given Expr. |
Object |
evaluate(Expr expr,
Object bean)
Evaluates the given Expr. |
Object |
getBean()
Returns this container's data bean, which may be null. |
protected Map<String,CompiledExpression> |
getCompiledExprCache()
|
protected JXPathContext |
getCtx()
|
protected static org.apache.commons.logging.Log |
log()
|
void |
setBean(Object bean)
Sets this container's data bean. |
protected void |
setCompiledExprCache(Map<String,CompiledExpression> compiledExprCache)
|
protected void |
setCtx(JXPathContext ctx)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public JXPathContext mCtx
| Constructor Detail |
|---|
public Evaluator()
protected Evaluator(Object bean)
Expr visitor.
bean - The bean to evaluate.| Method Detail |
|---|
public static Object eval(Object bean,
Expr expr)
Expr against a bean.
bean - A bean object.expr - An Expr.
true if the bean's properties match the Expr.public Object evaluate(Expr expr)
Expr.
expr - The given Expr.
Expr against a bean.
public Object evaluate(Expr expr,
Object bean)
Expr.
expr - The given Expr.
Expr against a bean.
public boolean assignValue(CharSequence expr,
Object value)
public boolean assignValue(CharSequence expr,
Object value,
Object bean)
public Object getBean()
BeanContainernull.
getBean in interface BeanContainer<Object>null.BeanContainer.getBean()public void setBean(Object bean)
BeanContainer
setBean in interface BeanContainer<Object>bean - this container's data bean.BeanContainer.setBean(java.lang.Object)public void compileExpr(CharSequence expr)
protected JXPathContext getCtx()
protected void setCtx(JXPathContext ctx)
ctx - the ctx to setprotected Map<String,CompiledExpression> getCompiledExprCache()
protected void setCompiledExprCache(Map<String,CompiledExpression> compiledExprCache)
compiledExprCache - the compiledExprCache to setprotected static org.apache.commons.logging.Log log()
|
Please visit Base Apps, hosted on Sourceforge.net. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||