public static ExpressionHandler getHandler ( Expression expression ) { ExpressionHandler ret = null ; Class < ? extends ExpressionHandler > cls = handlers . get ( expression . getClass ( ) ) ; if ( cls != null ) { try { Constructor < ? extends ExpressionHandler > con = cls . getConstructor ( Expression . class ) ; ret = con . newInstance ( expression ) ; } catch ( Exception e ) { log . log ( Level . SEVERE , "Failed to instantiate handler for expression '" + expression + "'" , e ) ; } } return ret ; }
This method returns an expression handler for the supplied expression .