public Class loadClass (String name, boolean resolve)     
    throws ClassNotFoundException {

    Object value = classes.get (name);
    if (value != null && value != INVALID) {
      Class klass = (Class) value;
      if (resolve) resolveClass (klass);
      return klass;

    } else {
      byte [] data = read (Classpath.find_class (name));
      if (data == null) return super.loadClass (name, resolve);
      else return instance.load (name, data, resolve);
    }
  }