code: protected synchronized Class loadClass(String classname, boolean resolve)
              throws ClassNotFoundException {
          // 'sync' is needed - otherwise 2 threads can load the same class
          // twice, resulting in LinkageError: duplicated class definition.
          // findLoadedClass avoids that, but without sync it won't work.
  
          Class theClass = findLoadedClass(classname);
          if (theClass != null) {
              return theClass;
          }
          if (isParentFirst(classname)) {
              try {
                  theClass = findBaseClass(classname);
                  log("Class " + classname + " loaded from parent loader " + "(parentFirst)",
                          Project.MSG_DEBUG);
              } catch (ClassNotFoundException cnfe) {
                  theClass = findClass(classname);
                  log("Class " + classname + " loaded from ant loader " + "(parentFirst)",
                          Project.MSG_DEBUG);
              }
          } else {
              try {
                  theClass = findClass(classname);
                  log("Class " + classname + " loaded from ant loader", Project.MSG_DEBUG);
              } catch (ClassNotFoundException cnfe) {
                  if (ignoreBase) {
                      throw cnfe;
                  }
                  theClass = findBaseClass(classname);
                  log("Class " + classname + " loaded from parent loader", Project.MSG_DEBUG);
              }
          }
          if (resolve) {
              resolveClass(theClass);
          }
          return theClass;
      }
docs: Loads a class with this class loader.
  
  This class attempts to load the class in an order determined by whether
  or not the class matches the system/loader package lists, with the
  loader package list taking priority. If the classloader is in isolated
  mode, failure to load the class in this loader will result in a
  ClassNotFoundException.
  
  @param classname The name of the class to be loaded.
  Must not be <code>null</code>.
  @param resolve <code>true</code> if all classes upon which this class
  depends are to be loaded.
  
  @return the required Class object
  
  @exception ClassNotFoundException if the requested class does not exist
  on the system classpath (when not in isolated mode) or this loader's
  classpath.