@ Deprecated @ SuppressWarnings ( "unchecked" ) private static < E extends LogRecordHandler > E getHandler ( Class < E > clazz ) { for ( LogRecordHandler cand : handlers ) { if ( clazz == cand . getClass ( ) ) { return ( E ) cand ; } } return null ; }
Get a handler based on its class