public static < T extends Extension > T getExtension ( Properties properties , Parameter < String > parameter , Driver d ) { T result ; String className = parameter . getValue ( properties ) ; if ( className == null ) { return null ; } try { if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "Creating extension " + className ) ; } result = ( T ) Class . forName ( className ) . newInstance ( ) ; result . init ( d , properties ) ; } catch ( InstantiationException | IllegalAccessException | ClassNotFoundException e ) { throw new ConfigurationException ( e ) ; } return result ; }
Get an extension as configured in properties .