public class ELManager
extends java.lang.Object
Constructor and Description |
---|
ELManager() |
Modifier and Type | Method and Description |
---|---|
void |
addBeanNameResolver(BeanNameResolver beanNameResolver)
Register a BeanNameResolver.
|
void |
addELResolver(ELResolver elResolver)
Add an user defined ELResolver to the list of ELResolvers.
|
void |
addEvaluationListener(EvaluationListener listener)
Register an evaluation listener.
|
java.lang.Object |
defineBean(java.lang.String name,
java.lang.Object bean)
Define a bean in the local bean repository
|
StandardELContext |
getELContext()
Return the ELContext used for parsing and evaluating Jakarta Expression Language expressions.
|
static ExpressionFactory |
getExpressionFactory()
Return the ExpressionFactory instance used for Jakarta Expression Language evaluations.
|
void |
importClass(java.lang.String className)
Import a class.
|
void |
importPackage(java.lang.String packageName)
Import a package.
|
void |
importStatic(java.lang.String staticMemberName)
Import a static field or method.
|
void |
mapFunction(java.lang.String prefix,
java.lang.String function,
java.lang.reflect.Method method)
Maps a static method to Jakarta Expression Language function.
|
ELContext |
setELContext(ELContext context)
Set the ELContext used for parsing and evaluating Jakarta Expression Language expressions.
|
void |
setVariable(java.lang.String variable,
ValueExpression expression)
Assign a ValueExpression to a Jakarta Expression Language variable, replacing any previous assignment to the same
variable.
|
public static ExpressionFactory getExpressionFactory()
public StandardELContext getELContext()
public ELContext setELContext(ELContext context)
context
- The new ELContext.public void addBeanNameResolver(BeanNameResolver beanNameResolver)
beanNameResolver
- The BeanNameResolver to be registered.public void addELResolver(ELResolver elResolver)
elResolver
- The ELResolver to be added to the list of ELResolvers in ELContext.StandardELContext.addELResolver(javax.el.ELResolver)
public void mapFunction(java.lang.String prefix, java.lang.String function, java.lang.reflect.Method method)
prefix
- The namespace of the functions, can be "".function
- The name of the function.method
- The static method to be invoked when the function is used.public void setVariable(java.lang.String variable, ValueExpression expression)
null
.variable
- The variable nameexpression
- The ValueExpression to be assigned to the variable.public void importStatic(java.lang.String staticMemberName) throws ELException
staticMemberName
- The full class name of the class to be importedELException
- if the name is not a full class name.public void importClass(java.lang.String className) throws ELException
className
- The full class name of the class to be importedELException
- if the name is not a full class name.public void importPackage(java.lang.String packageName)
packageName
- The package name to be importedpublic java.lang.Object defineBean(java.lang.String name, java.lang.Object bean)
name
- The name of the beanbean
- The bean instance to be defined. If null, the definition of the bean is removed.name
public void addEvaluationListener(EvaluationListener listener)
listener
- The evaluation listener to be added.