public static JillExtension loadExtension ( String className ) { JillExtension extension = null ; Class < ? > eclass ; try { // Check that we have the extension class, else abort eclass = Class . forName ( className ) ; if ( ! JillExtension . class . isAssignableFrom ( eclass ) ) { logger . error ( "Class '" + className + "' does not implement " + JillExtension . class . getName ( ) ) ; return null ; } logger . info ( "Loading extension " + className ) ; extension = ( JillExtension ) ( eclass . newInstance ( ) ) ; } catch ( ClassNotFoundException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException e ) { logger . error ( "Could not load extension " + className , e ) ; } return extension ; }
Loads a Jill extension .