Package org.zkoss.zel
Class BeanNameResolver
- java.lang.Object
-
- org.zkoss.zel.BeanNameResolver
-
- Direct Known Subclasses:
XelELResolver.StandardBeanNameResolver
public abstract class BeanNameResolver extends java.lang.Object
Base implementation that provides a minimal default implementation that is intended to be extended by application developers.- Since:
- EL 3.0
-
-
Constructor Summary
Constructors Constructor Description BeanNameResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canCreateBean(java.lang.String beanName)
Is it permitted to create a bean of the given name?java.lang.Object
getBean(java.lang.String beanName)
Returns the named bean.boolean
isNameResolved(java.lang.String beanName)
Can this resolver resolve the given bean name?boolean
isReadOnly(java.lang.String beanName)
Is the named bean read-only?void
setBeanValue(java.lang.String beanName, java.lang.Object value)
Sets a value of a bean of the given name.
-
-
-
Method Detail
-
isNameResolved
public boolean isNameResolved(java.lang.String beanName)
Can this resolver resolve the given bean name?- Parameters:
beanName
- The bean name to resolve- Returns:
- This default implementation always returns
false
-
getBean
public java.lang.Object getBean(java.lang.String beanName)
Returns the named bean.- Parameters:
beanName
- The bean name to return- Returns:
- This default implementation always returns
null
-
setBeanValue
public void setBeanValue(java.lang.String beanName, java.lang.Object value) throws PropertyNotWritableException
Sets a value of a bean of the given name. If the named bean does not exist andcanCreateBean(java.lang.String)
returnstrue
then a bean is created with the given value.- Parameters:
beanName
- The name of the bean to be set/createvalue
- The value of the bean to set/create- Throws:
PropertyNotWritableException
- if the bean is read only
-
isReadOnly
public boolean isReadOnly(java.lang.String beanName)
Is the named bean read-only?- Parameters:
beanName
- The name of the bean of interest- Returns:
true
if the bean is read only, otherwisefalse
-
canCreateBean
public boolean canCreateBean(java.lang.String beanName)
Is it permitted to create a bean of the given name?- Parameters:
beanName
- The name of the bean of interest- Returns:
true
if the bean may be created, otherwisefalse
-
-