public class ELManager
extends java.lang.Object
Manages EL parsing and evaluation environment. The ELManager maintains an instance of ExpressionFactory and StandardELContext, for parsing and evaluating EL expressions.
| Constructor and Description |
|---|
ELManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBeanNameResolver(BeanNameResolver bnr)
Register a BeanNameResolver.
|
void |
addELResolver(ELResolver elr)
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 EL expressions.
|
static ExpressionFactory |
getExpressionFactory()
Return the ExpressionFactory instance used for EL evaluations.
|
void |
importClass(java.lang.String className)
Import a class.
|
void |
importPackage(java.lang.String packageName)
Import a package.
|
void |
mapFunction(java.lang.String prefix,
java.lang.String function,
java.lang.reflect.Method meth)
Maps a static method to an EL function.
|
ELContext |
setELContext(ELContext context)
Set the ELContext used for parsing and evaluating EL expressions.
|
void |
setVariable(java.lang.String variable,
ValueExpression expression)
Assign a ValueExpression to an EL 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 bnr)
bnr - The BeanNameResolver to be registered.public void addELResolver(ELResolver elr)
elr - 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 meth)
prefix - The namespace of the functions, can be "".function - The name of the function.meth - 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 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.public void addEvaluationListener(EvaluationListener listener)
listener - The evaluation listener to be added.Copyright (c) 1999-2012 Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.