public abstract class ELContext
extends java.lang.Object
Constructor and Description |
---|
ELContext() |
Modifier and Type | Method and Description |
---|---|
void |
addEvaluationListener(EvaluationListener listener)
Register an EvaluationListener with this ELContext.
|
java.lang.Object |
convertToType(java.lang.Object obj,
java.lang.Class<?> type)
Coerce the supplied object to the requested type.
|
void |
enterLambdaScope(java.util.Map<java.lang.String,java.lang.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.
|
java.lang.Object |
getContext(java.lang.Class key)
Obtain the context object for the given key.
|
abstract ELResolver |
getELResolver() |
java.util.List<EvaluationListener> |
getEvaluationListeners()
Obtain the list of registered EvaluationListeners.
|
abstract FunctionMapper |
getFunctionMapper() |
ImportHandler |
getImportHandler()
Obtain the ImportHandler for this ELContext, creating one if necessary.
|
java.lang.Object |
getLambdaArgument(java.lang.String name)
Obtain the value of the lambda argument with the given name.
|
java.util.Locale |
getLocale() |
abstract VariableMapper |
getVariableMapper() |
boolean |
isLambdaArgument(java.lang.String name)
Determine if the specified name is recognised as the name of a lambda
argument.
|
boolean |
isPropertyResolved() |
void |
notifyAfterEvaluation(java.lang.String expression)
Notify interested listeners that an expression has been evaluated.
|
void |
notifyBeforeEvaluation(java.lang.String expression)
Notify interested listeners that an expression will be evaluated.
|
void |
notifyPropertyResolved(java.lang.Object base,
java.lang.Object property)
Notify interested listeners that a property has been resolved.
|
void |
putContext(java.lang.Class key,
java.lang.Object contextObject)
Add an object to this EL context under the given key.
|
void |
setLocale(java.util.Locale locale) |
void |
setPropertyResolved(boolean resolved) |
void |
setPropertyResolved(java.lang.Object base,
java.lang.Object property)
Mark the given property as resolved and notfy any interested listeners.
|
public void setPropertyResolved(boolean resolved)
public void setPropertyResolved(java.lang.Object base, java.lang.Object property)
base
- The base object on which the property was foundproperty
- The property that was resolvedpublic boolean isPropertyResolved()
public void putContext(java.lang.Class key, java.lang.Object contextObject)
key
- The key under which to store the objectcontextObject
- The object to addjava.lang.NullPointerException
- If the supplied key or context is null
public java.lang.Object getContext(java.lang.Class key)
key
- The key of the required context objectjava.lang.NullPointerException
- If the supplied key is null
public abstract ELResolver getELResolver()
public ImportHandler getImportHandler()
public abstract FunctionMapper getFunctionMapper()
public java.util.Locale getLocale()
public void setLocale(java.util.Locale locale)
public abstract VariableMapper getVariableMapper()
public void addEvaluationListener(EvaluationListener listener)
listener
- The EvaluationListener to registerpublic java.util.List<EvaluationListener> getEvaluationListeners()
public void notifyBeforeEvaluation(java.lang.String expression)
expression
- The expression that will be evaluatedpublic void notifyAfterEvaluation(java.lang.String expression)
expression
- The expression that was evaluatedpublic void notifyPropertyResolved(java.lang.Object base, java.lang.Object property)
base
- The object on which the property was resolvedproperty
- The property that was resolvedpublic boolean isLambdaArgument(java.lang.String name)
name
- The name of the lambda argumenttrue
if the name is recognised as the name of a
lambda argument, otherwise false
public java.lang.Object getLambdaArgument(java.lang.String name)
name
- The name of the lambda argumentpublic void enterLambdaScope(java.util.Map<java.lang.String,java.lang.Object> arguments)
arguments
- The arguments in scope for the current lambda
expression.public void exitLambdaScope()
public java.lang.Object convertToType(java.lang.Object obj, java.lang.Class<?> type)
obj
- The object to be coercedtype
- The type to which the object should be coercedELException
- If the conversion failsCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.