java.util.Map .
This resolver handles base objects of type java.util.Map. It accepts any object as a property and uses
that object as a key in the map. The resulting value is the value in the map that is associated with that key.
This resolver can be constructed in read-only mode, which means that isReadOnly will always return
true and setValue will always throw PropertyNotWritableException.
ELResolvers are combined together using CompositeELResolvers, to define rich semantics for
evaluating an expression. See the javadocs for ELResolver for details.
CompositeELResolver, ELResolver, java.util.Map
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private static Class |
| Access | Constructor and Description |
|---|---|
| public | |
| public | MapELResolver(boolean
true if this resolver cannot modify maps; false otherwise.Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| public Class | Returns: null if base is not a Map; otherwise Object.class.The context of this evaluation. context, Object The map to analyze. Only bases of type base)Map are handled by this resolver.Implements abstract jakarta. If the base object is a map, returns the most general type that this resolver accepts for the |
| public Class | Returns: If thepropertyResolved property of ELContext was set to true, then
the most general acceptable type which must be null if the either the property or the resolver is
read-only; otherwise undefinedThe context of this evaluation. context, Object The map to analyze. Only bases of type base, Object Map are handled by this resolver.The key to return the acceptable type for. Ignored by this resolver. property)Implements abstract jakarta. If the base object is a map, returns the most general acceptable type for a value in this map. |
| public Object | Returns: If thepropertyResolved property of ELContext was set to true, then
the value associated with the given key or null if the key was not found. Otherwise, undefined.The context of this evaluation. context, Object The map to be analyzed. Only bases of type base, Object Map are handled by this resolver.The key whose associated value is to be returned. property)Implements abstract jakarta. If the base object is a map, returns the value associated with the given key, as specified by the
|
| public boolean | Returns: If thepropertyResolved property of ELContext was set to true, then
true if calling the setValue method will always fail or false if it is
possible that such a call may succeed; otherwise undefined.The context of this evaluation. context, Object The map to analyze. Only bases of type base, Object Map are handled by this resolver.The key to return the read-only status for. Ignored by this resolver. property)Implements abstract jakarta. If the base object is a map, returns whether a call to |
| public void | setValue(ELContext
The context of this evaluation. context, Object The map to be modified. Only bases of type base, Object Map are handled by this resolver.The key with which the specified value is to be associated. property, Object The value to be associated with the specified key. val)Implements abstract jakarta. If the base object is a map, attempts to set the value associated with the given key, as specified by the
|
| isReadOnly | back to summary |
|---|---|
| private boolean isReadOnly | |
| theUnmodifiableMapClass | back to summary |
|---|---|
| private static Class<?> theUnmodifiableMapClass | |
| MapELResolver | back to summary |
|---|---|
| public MapELResolver() Creates a new read/write | |
| MapELResolver | back to summary |
|---|---|
| public MapELResolver(boolean isReadOnly) Creates a new
| |
| getCommonPropertyType | back to summary |
|---|---|
| public Class Implements abstract jakarta. If the base object is a map, returns the most general type that this resolver accepts for the
Assuming the base is a | |
| getType | back to summary |
|---|---|
| public Class Implements abstract jakarta. If the base object is a map, returns the most general acceptable type for a value in this map.
If the base is a
Assuming the base is a
| |
| getValue | back to summary |
|---|---|
| public Object getValue(ELContext context, Object base, Object property) Implements abstract jakarta. If the base object is a map, returns the value associated with the given key, as specified by the
If the base is a
Just as in
| |
| isReadOnly | back to summary |
|---|---|
| public boolean isReadOnly(ELContext context, Object base, Object property) Implements abstract jakarta. If the base object is a map, returns whether a call to
If the base is a
If this resolver was constructed in read-only mode, this method will always return
If a
| |
| setValue | back to summary |
|---|---|
| public void setValue(ELContext context, Object base, Object property, Object val) Implements abstract jakarta. If the base object is a map, attempts to set the value associated with the given key, as specified by the
If the base is a
If this resolver was constructed in read-only mode, this method will always throw
If a
| |