private static Class < ? > loadClass ( String className , Class < ? > classType ) { Class < ? > aclass = null ; try { aclass = Class . forName ( className ) ; } catch ( ClassNotFoundException e ) { logger . error ( "Class not found: " + className , e ) ; return null ; } if ( ! classType . isAssignableFrom ( aclass ) ) { logger . error ( "Class '" + className + "' is not of type " + classType . getName ( ) ) ; return null ; } logger . info ( "Found class " + className + " of type " + classType . getName ( ) ) ; return aclass ; }
Loads the class of given name and type .