public static InitStrategy get ( ClassLoader cl ) throws IOException { Iterator < InitStrategy > it = ServiceLoader . load ( InitStrategy . class , cl ) . iterator ( ) ; if ( ! it . hasNext ( ) ) { return new InitStrategy ( ) ; // default } InitStrategy s = it . next ( ) ; LOGGER . log ( Level . FINE , "Using {0} as InitStrategy" , s ) ; return s ; }
Obtains the instance to be used .