public static < T > T coerceToType ( ELContext context , Class < T > toType , Object object ) { @ SuppressWarnings ( "unchecked" ) T result = ( T ) getExpressionFactory ( context ) . coerceToType ( object , toType ) ; return result ; }
Use EL specification coercion facilities to coerce an object to the specified type .