Package de.odysseus.el.util
Class RootPropertyResolver
- java.lang.Object
-
- javax.el.ELResolver
-
- de.odysseus.el.util.RootPropertyResolver
-
public class RootPropertyResolver extends javax.el.ELResolverSimple root property resolver implementation. This resolver handles root properties (i.e.base == null && property instanceof String), which are stored in a map. The properties can be accessed via thegetProperty(String),setProperty(String, Object),isProperty(String)andproperties()methods.
-
-
Constructor Summary
Constructors Constructor Description RootPropertyResolver()Create a read/write root property resolverRootPropertyResolver(boolean readOnly)Create a root property resolver
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<?>getCommonPropertyType(javax.el.ELContext context, java.lang.Object base)java.util.Iterator<java.beans.FeatureDescriptor>getFeatureDescriptors(javax.el.ELContext context, java.lang.Object base)java.lang.ObjectgetProperty(java.lang.String property)Get property valuejava.lang.Class<?>getType(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)java.lang.ObjectgetValue(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)java.lang.Objectinvoke(javax.el.ELContext context, java.lang.Object base, java.lang.Object method, java.lang.Class<?>[] paramTypes, java.lang.Object[] params)booleanisProperty(java.lang.String property)Test propertybooleanisReadOnly(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)private booleanisResolvable(java.lang.Object base)java.lang.Iterable<java.lang.String>properties()Get propertiesprivate booleanresolve(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)voidsetProperty(java.lang.String property, java.lang.Object value)Set property valuevoidsetValue(javax.el.ELContext context, java.lang.Object base, java.lang.Object property, java.lang.Object value)
-
-
-
Method Detail
-
isResolvable
private boolean isResolvable(java.lang.Object base)
-
resolve
private boolean resolve(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)
-
getCommonPropertyType
public java.lang.Class<?> getCommonPropertyType(javax.el.ELContext context, java.lang.Object base)- Specified by:
getCommonPropertyTypein classjavax.el.ELResolver
-
getFeatureDescriptors
public java.util.Iterator<java.beans.FeatureDescriptor> getFeatureDescriptors(javax.el.ELContext context, java.lang.Object base)- Specified by:
getFeatureDescriptorsin classjavax.el.ELResolver
-
getType
public java.lang.Class<?> getType(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)- Specified by:
getTypein classjavax.el.ELResolver
-
getValue
public java.lang.Object getValue(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)- Specified by:
getValuein classjavax.el.ELResolver
-
isReadOnly
public boolean isReadOnly(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)- Specified by:
isReadOnlyin classjavax.el.ELResolver
-
setValue
public void setValue(javax.el.ELContext context, java.lang.Object base, java.lang.Object property, java.lang.Object value) throws javax.el.PropertyNotWritableException- Specified by:
setValuein classjavax.el.ELResolver- Throws:
javax.el.PropertyNotWritableException
-
invoke
public java.lang.Object invoke(javax.el.ELContext context, java.lang.Object base, java.lang.Object method, java.lang.Class<?>[] paramTypes, java.lang.Object[] params)- Overrides:
invokein classjavax.el.ELResolver
-
getProperty
public java.lang.Object getProperty(java.lang.String property)
Get property value- Parameters:
property- property name- Returns:
- value associated with the given property
-
setProperty
public void setProperty(java.lang.String property, java.lang.Object value)Set property value- Parameters:
property- property namevalue- property value
-
isProperty
public boolean isProperty(java.lang.String property)
Test property- Parameters:
property- property name- Returns:
trueif the given property is associated with a value
-
properties
public java.lang.Iterable<java.lang.String> properties()
Get properties- Returns:
- all property names (in no particular order)
-
-