java.util.List .
This resolver handles base objects of type java.util.List. It accepts any object as a property and
coerces that object into an integer index into the list. The resulting value is the value in the list at that index.
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.List
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private static Class |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ListELResolver(boolean
true if this resolver cannot modify lists; false otherwise.Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| public Class | Returns: null if base is not a List; otherwise Integer.class.The context of this evaluation. context, Object The list to analyze. Only bases of type base)List are handled by this resolver.Implements abstract jakarta. If the base object is a list, 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 list to analyze. Only bases of type base, Object List are handled by this resolver.The index of the element in the list to return the acceptable type for. Will be coerced into an
integer, but otherwise ignored by this resolver. property)Implements abstract jakarta. If the base object is a list, returns the most general acceptable type for a value in this list. |
| public Object | Returns: If thepropertyResolved property of ELContext was set to true, then
the value at the given index or null if the index was out of bounds. Otherwise, undefined.The context of this evaluation. context, Object The list to be analyzed. Only bases of type base, Object List are handled by this resolver.The index of the value to be returned. Will be coerced into an integer. property)Implements abstract jakarta. If the base object is a list, returns the value at the given index. |
| 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 list to analyze. Only bases of type base, Object List are handled by this resolver.The index of the element in the list to return the acceptable type for. Will be coerced into an
integer, but otherwise ignored by this resolver. property)Implements abstract jakarta. If the base object is a list, returns whether a call to |
| public void | setValue(ELContext
The context of this evaluation. context, Object The list to be modified. Only bases of type base, Object List are handled by this resolver.The index of the value to be set. Will be coerced into an integer. property, Object The value to be set at the given index. val)Implements abstract jakarta. If the base object is a list, attempts to set the value at the given index with the given value. |
| private int |
| isReadOnly | back to summary |
|---|---|
| private boolean isReadOnly | |
| theUnmodifiableListClass | back to summary |
|---|---|
| private static Class<?> theUnmodifiableListClass | |
| ListELResolver | back to summary |
|---|---|
| public ListELResolver() Creates a new read/write | |
| ListELResolver | back to summary |
|---|---|
| public ListELResolver(boolean isReadOnly) Creates a new
| |
| getCommonPropertyType | back to summary |
|---|---|
| public Class Implements abstract jakarta. If the base object is a list, 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 list, returns the most general acceptable type for a value in this list.
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 list, returns the value at the given index. The index is specified by the
If the base is a
| |
| isReadOnly | back to summary |
|---|---|
| public boolean isReadOnly(ELContext context, Object base, Object property) Implements abstract jakarta. If the base object is a list, 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 list, attempts to set the value at the given index with the given value. The index is
specified by the
If the base is a
If this resolver was constructed in read-only mode, this method will always throw
If a
| |
| toInteger | back to summary |
|---|---|
| private int toInteger(Object p) | |