Module jakarta.el
Package jakarta.el

Class BeanNameELResolver

java.lang.Object
jakarta.el.ELResolver
jakarta.el.BeanNameELResolver

public class BeanNameELResolver extends ELResolver

An ELResolver for resolving user or container managed beans.

A BeanNameResolver is required for its proper operation. The following example creates an ELResolver that resolves the name "bean" to an instance of MyBean.

 
 ELResovler elr = new BeanNameELResolver(new BeanNameResolver {
    public boolean isNameResolved(String beanName) {
       return "bean".equals(beanName);
    }
    public Object getBean(String beanName) {
       return "bean".equals(beanName)? new MyBean(): null;
    }
 });
 
 
Since:
Jakarta Expression Language 3.0