jill/src/main/java/io/github/agentsoz/jill/core/ProgramLoader.java
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;
  }
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;
  }
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.

@param className the fully qualified class name
@param classType the class type to check against
@return the loaded class, or null if unsuccessful
Loads the class of given name and type .