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;
}
});
| Modifier and Type | Field and Description |
|---|---|
| private BeanNameResolver |
| Access | Constructor and Description |
|---|---|
| public | BeanNameELResolver(BeanNameResolver
The beanNameResolver)BeanNameResolver that resolves a bean name.Constructor |
| Modifier and Type | Method and Description |
|---|---|
| public Class | Returns: String.class.The context of this evaluation. context, Object null.Implements abstract jakarta. String.class, since a bean name is a String.
|
| public Iterator | Returns: null.The context of this evaluation. context, Object null.Overrides jakarta.
Deprecated
for removal since 5.0. This method will be removed without replacement in EL 6.0
Always returns null, since there is no reason to iterate through a list of one element: bean name.
|
| public Class | Returns: If thepropertyResolved property of ELContext was set to true and
the associated BeanNameResolver is not read-only then the type of the bean with the given name. If the given
bean name was resolved but the associated BeanNameResolver is read-only then null. Otherwise, undefined.The context of this evaluation. context, Object nullThe name of the bean. property)Implements abstract jakarta. |
| public Object | Returns: If thepropertyResolved property of ELContext was set to true, then
the value of the bean with the given name. Otherwise, undefined.The context of this evaluation. context, Object nullThe name of the bean. property)Implements abstract jakarta. null and the property is a name that is resolvable by the BeanNameResolver,
returns the value resolved by the BeanNameResolver.
|
| public boolean | Returns: If thepropertyResolved property of ELContext was set to true, then
true if the property is read-only or false if not; otherwise undefined.The context of this evaluation. context, Object nullThe name of the bean. property)Implements abstract jakarta. |
| public void | setValue(ELContext
The context of this evaluation. context, Object nullThe name of the bean property, Object The value to set the bean with the given name to. value)Implements abstract jakarta. |
| beanNameResolver | back to summary |
|---|---|
| private BeanNameResolver beanNameResolver | |
| BeanNameELResolver | back to summary |
|---|---|
| public BeanNameELResolver(BeanNameResolver beanNameResolver) Constructor
| |
| getCommonPropertyType | back to summary |
|---|---|
| public Class Implements abstract jakarta. Always returns | |
| getFeatureDescriptors | back to summary |
|---|---|
| public Iterator Overrides jakarta. Deprecated for removal since 5.0. This method will be removed without replacement in EL 6.0 Always returns
| |
| getType | back to summary |
|---|---|
| public Class Implements abstract jakarta. If the base is null and the property is a name resolvable by the BeanNameResolver, return the type of the bean.
If the name is resolvable by the BeanNameResolver, the
| |
| getValue | back to summary |
|---|---|
| public Object getValue(ELContext context, Object base, Object property) Implements abstract jakarta. If the base object is
If name is resolved by the BeanNameResolver, the
| |
| isReadOnly | back to summary |
|---|---|
| public boolean isReadOnly(ELContext context, Object base, Object property) Implements abstract jakarta. If the base is null and the property is a name resolvable by the BeanNameResolver, attempts to determine if the bean is writable.
If the name is resolvable by the BeanNameResolver, the
| |
| setValue | back to summary |
|---|---|
| public void setValue(ELContext context, Object base, Object property, Object value) Implements abstract jakarta. If the base is null and the property is a name that is resolvable by the BeanNameResolver, the bean in the BeanNameResolver is set to the given value.
If the name is resolvable by the BeanNameResolver, or if the BeanNameResolver allows creating a new bean, the
| |