@ Override public Object getValue ( ELContext context , Object base , Object property ) { if ( context == null ) { throw new NullPointerException ( "context is null" ) ; } Object result = null ; if ( isResolvable ( base ) ) { int index = toIndex ( null , property ) ; List < ? > list = ( List < ? > ) base ; result = index < 0 || index >= list . size ( ) ? null : list . get ( index ) ; context . setPropertyResolved ( true ) ; } return result ; }
If the base object is a list returns the value at the given index . The index is specified by the property argument and coerced into an integer . If the coercion could not be performed an IllegalArgumentException is thrown . If the index is out of bounds null is returned . If the base is a List the propertyResolved property of the ELContext object must be set to true by this resolver before returning . If this property is not true after this method is called the caller should ignore the return value .