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 javax. String.class, since a bean name is a String.
|
| public Iterator | Returns: null.The context of this evaluation. context, Object null.Implements abstract javax. 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, then
the type of the bean with the given name. Otherwise, undefined.The context of this evaluation. context, Object nullThe name of the bean. property)Implements abstract javax. |
| 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 javax. 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 javax. |
| 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 javax. |
| beanNameResolver | back to summary |
|---|---|
| private BeanNameResolver beanNameResolver | |
| BeanNameELResolver | back to summary |
|---|---|
| public BeanNameELResolver(BeanNameResolver beanNameResolver) Constructor
| |
| getCommonPropertyType | back to summary |
|---|---|
| public Class Implements abstract javax. Always returns | |
| getFeatureDescriptors | back to summary |
|---|---|
| public Iterator Implements abstract javax. Always returns
| |
| getType | back to summary |
|---|---|
| public Class Implements abstract javax. 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 javax. 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 javax. 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 javax. 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
| |