|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.zel.ELContext
org.zkoss.zel.impl.lang.EvaluationContext
public final class EvaluationContext
| Constructor Summary | |
|---|---|
EvaluationContext(ELContext elContext,
FunctionMapper fnMapper,
VariableMapper varMapper)
|
|
| Method Summary | |
|---|---|
void |
addEvaluationListener(EvaluationListener listener)
Register an EvaluationListener with this ELContext. |
Object |
convertToType(Object obj,
Class<?> type)
Coerce the supplied object to the requested type. |
void |
enterLambdaScope(Map<String,Object> arguments)
Called when starting to evaluate a lambda expression so that the arguments are available to the EL context during evaluation. |
void |
exitLambdaScope()
Called after evaluating a lambda expression to signal that the arguments are no longer required. |
Object |
getContext(Class key)
Obtain the context object for the given key. |
ELContext |
getELContext()
|
ELResolver |
getELResolver()
|
List<EvaluationListener> |
getEvaluationListeners()
Obtain the list of registered EvaluationListeners. |
FunctionMapper |
getFunctionMapper()
|
ImportHandler |
getImportHandler()
Obtain the ImportHandler for this ELContext, creating one if necessary. |
Object |
getLambdaArgument(String name)
Obtain the value of the lambda argument with the given name. |
Locale |
getLocale()
|
VariableMapper |
getVariableMapper()
|
boolean |
isLambdaArgument(String name)
Determine if the specified name is recognised as the name of a lambda argument. |
boolean |
isPropertyResolved()
|
void |
notifyAfterEvaluation(String expression)
Notify interested listeners that an expression has been evaluated. |
void |
notifyBeforeEvaluation(String expression)
Notify interested listeners that an expression will be evaluated. |
void |
notifyPropertyResolved(Object base,
Object property)
Notify interested listeners that a property has been resolved. |
void |
putContext(Class key,
Object contextObject)
Add an object to this EL context under the given key. |
void |
setLocale(Locale locale)
|
void |
setPropertyResolved(boolean resolved)
|
void |
setPropertyResolved(Object base,
Object property)
Mark the given property as resolved and notfy any interested listeners. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EvaluationContext(ELContext elContext,
FunctionMapper fnMapper,
VariableMapper varMapper)
| Method Detail |
|---|
public ELContext getELContext()
public FunctionMapper getFunctionMapper()
getFunctionMapper in class ELContextpublic VariableMapper getVariableMapper()
getVariableMapper in class ELContextpublic Object getContext(Class key)
ELContext
getContext in class ELContextkey - The key of the required context object
public ELResolver getELResolver()
getELResolver in class ELContextpublic boolean isPropertyResolved()
isPropertyResolved in class ELContext
public void putContext(Class key,
Object contextObject)
ELContext
putContext in class ELContextkey - The key under which to store the objectcontextObject - The object to addpublic void setPropertyResolved(boolean resolved)
setPropertyResolved in class ELContextpublic Locale getLocale()
getLocale in class ELContextpublic void setLocale(Locale locale)
setLocale in class ELContext
public void setPropertyResolved(Object base,
Object property)
ELContext
setPropertyResolved in class ELContextbase - The base object on which the property was foundproperty - The property that was resolvedpublic ImportHandler getImportHandler()
ELContext
getImportHandler in class ELContextpublic void addEvaluationListener(EvaluationListener listener)
ELContext
addEvaluationListener in class ELContextlistener - The EvaluationListener to registerpublic List<EvaluationListener> getEvaluationListeners()
ELContext
getEvaluationListeners in class ELContextpublic void notifyBeforeEvaluation(String expression)
ELContext
notifyBeforeEvaluation in class ELContextexpression - The expression that will be evaluatedpublic void notifyAfterEvaluation(String expression)
ELContext
notifyAfterEvaluation in class ELContextexpression - The expression that was evaluated
public void notifyPropertyResolved(Object base,
Object property)
ELContext
notifyPropertyResolved in class ELContextbase - The object on which the property was resolvedproperty - The property that was resolvedpublic boolean isLambdaArgument(String name)
ELContext
isLambdaArgument in class ELContextname - The name of the lambda argument
true if the name is recognised as the name of a
lambda argument, otherwise falsepublic Object getLambdaArgument(String name)
ELContext
getLambdaArgument in class ELContextname - The name of the lambda argument
public void enterLambdaScope(Map<String,Object> arguments)
ELContext
enterLambdaScope in class ELContextarguments - The arguments in scope for the current lambda
expression.public void exitLambdaScope()
ELContext
exitLambdaScope in class ELContext
public Object convertToType(Object obj,
Class<?> type)
ELContext
convertToType in class ELContextobj - The object to be coercedtype - The type to which the object should be coerced
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||