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 javax. property argument.
|
| public Iterator | Returns: null.The context of this evaluation. context, Object The list. Only bases of type base)List are
handled by this resolver.Implements abstract javax. null, since there is no reason to
iterate through set set of all integers.
|
| 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 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 javax. |
| 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 javax. |
| 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 javax. setValue will always fail.
|
| 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 javax. |
| 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 javax. If the base object is a list, 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. Always returns The
| |
| getType | back to summary |
|---|---|
| public Class Implements abstract javax. 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 javax. 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 javax. 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 javax. 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) | |