public class ELManager extends 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.
|
Object |
defineBean(String name,
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(String className)
Import a class.
|
void |
importPackage(String packageName)
Import a package.
|
void |
importStatic(String staticMemberName)
Import a static field or method.
|
void |
mapFunction(String prefix,
String function,
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(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(String prefix, String function, 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(String variable, ValueExpression expression)
null
.variable
- The variable nameexpression
- The ValueExpression to be assigned to the variable.public void importStatic(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(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(String packageName)
packageName
- The package name to be importedpublic Object defineBean(String name, 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.Comments to: el-dev@eclipse.org.
Copyright © 2019 Eclipse Foundation. All rights reserved.
Use is subject to license terms.