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 javax. property argument.
|
| public Iterator | Returns: AnIterator containing zero or more (possibly
infinitely more) FeatureDescriptor objects, each
representing a key in this map, or null if
the base object is not a map.The context of this evaluation. context, Object The map whose keys are to be iterated over. Only bases
of type base)Map are handled by this resolver.Implements abstract javax. Iterator
containing the set of keys available in the Map.
|
| public Class | Returns: If thepropertyResolved property of
ELContext was set to true, then
the most general acceptable type; 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 acceptable type for.
Ignored by this resolver. property)Implements abstract javax. |
| 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 javax. property argument.
|
| 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 javax. setValue will always fail.
|
| 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 javax. property argument.
|
| 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 javax. If the base object is a map, returns the most general type that
this resolver accepts for the Assuming the base is a | |
| getFeatureDescriptors | back to summary |
|---|---|
| public Iterator Implements abstract javax. If the base object is a map, returns an The toString method on this key, or
"null" if the key is null.falsefalsetrueFeatureDescriptors:
ELResolver#TYPE - The return value of calling the getClass()
method on this key, or null if the key is
null.ELResolver#RESOLVABLE_AT_DESIGN_TIME - true
| |
| getType | back to summary |
|---|---|
| public Class Implements abstract javax. 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 javax. 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 javax. 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 javax. 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
| |