public static < T > T resolveValue ( ValueExpression expression , Class < T > type , ELContext elContext ) { if ( expression == null ) { return null ; } else { return type . cast ( expression . getValue ( elContext ) ) ; } }
Evaluates an expression then casts to the provided type .