private static void checkUserClasses() {
    System.out.print(" user-check");

    Class aclsInt = (new int[0]).getClass();
    Class clsObject = Lib.loadClass("java.lang.Object");
    Class clsRunnable = Lib.loadClass("java.lang.Runnable");
    Class clsString = Lib.loadClass("java.lang.String");

    Class clsKernel = Lib.loadClass("nachos.machine.Kernel");
    Class clsFileSystem = Lib.loadClass("nachos.machine.FileSystem");
    Class clsRiderControls = Lib.loadClass("nachos.machine.RiderControls");
    Class clsElevatorControls = Lib.loadClass("nachos.machine.ElevatorControls");
    Class clsRiderInterface = Lib.loadClass("nachos.machine.RiderInterface");
    Class clsElevatorControllerInterface =
        Lib.loadClass("nachos.machine.ElevatorControllerInterface");

    Class clsAlarm = Lib.loadClass("nachos.threads.Alarm");
    Class clsThreadedKernel = Lib.loadClass("nachos.threads.ThreadedKernel");
    Class clsKThread = Lib.loadClass("nachos.threads.KThread");
    Class clsCommunicator = Lib.loadClass("nachos.threads.Communicator");
    Class clsSemaphore = Lib.loadClass("nachos.threads.Semaphore");
    Class clsLock = Lib.loadClass("nachos.threads.Lock");
    Class clsCondition = Lib.loadClass("nachos.threads.Condition");
    Class clsCondition2 = Lib.loadClass("nachos.threads.Condition2");
    Class clsRider = Lib.loadClass("nachos.threads.Rider");
    Class clsElevatorController = Lib.loadClass("nachos.threads.ElevatorController");

    Lib.checkDerivation(clsThreadedKernel, clsKernel);

    Lib.checkStaticField(clsThreadedKernel, "alarm", clsAlarm);
    Lib.checkStaticField(clsThreadedKernel, "fileSystem", clsFileSystem);

    Lib.checkMethod(clsAlarm, "waitUntil", new Class[] {long.class}, void.class);

    Lib.checkConstructor(clsKThread, new Class[] {});
    Lib.checkConstructor(clsKThread, new Class[] {clsRunnable});

    Lib.checkStaticMethod(clsKThread, "currentThread", new Class[] {}, clsKThread);
    Lib.checkStaticMethod(clsKThread, "finish", new Class[] {}, void.class);
    Lib.checkStaticMethod(clsKThread, "yield", new Class[] {}, void.class);
    Lib.checkStaticMethod(clsKThread, "sleep", new Class[] {}, void.class);

    Lib.checkMethod(clsKThread, "setTarget", new Class[] {clsRunnable}, clsKThread);
    Lib.checkMethod(clsKThread, "setName", new Class[] {clsString}, clsKThread);
    Lib.checkMethod(clsKThread, "getName", new Class[] {}, clsString);
    Lib.checkMethod(clsKThread, "fork", new Class[] {}, void.class);
    Lib.checkMethod(clsKThread, "ready", new Class[] {}, void.class);
    Lib.checkMethod(clsKThread, "join", new Class[] {}, void.class);

    Lib.checkField(clsKThread, "schedulingState", clsObject);

    Lib.checkConstructor(clsCommunicator, new Class[] {});
    Lib.checkMethod(clsCommunicator, "speak", new Class[] {int.class}, void.class);
    Lib.checkMethod(clsCommunicator, "listen", new Class[] {}, int.class);

    Lib.checkConstructor(clsSemaphore, new Class[] {int.class});
    Lib.checkMethod(clsSemaphore, "P", new Class[] {}, void.class);
    Lib.checkMethod(clsSemaphore, "V", new Class[] {}, void.class);

    Lib.checkConstructor(clsLock, new Class[] {});
    Lib.checkMethod(clsLock, "acquire", new Class[] {}, void.class);
    Lib.checkMethod(clsLock, "release", new Class[] {}, void.class);
    Lib.checkMethod(clsLock, "isHeldByCurrentThread", new Class[] {}, boolean.class);

    Lib.checkConstructor(clsCondition, new Class[] {clsLock});
    Lib.checkConstructor(clsCondition2, new Class[] {clsLock});

    Lib.checkMethod(clsCondition, "sleep", new Class[] {}, void.class);
    Lib.checkMethod(clsCondition, "wake", new Class[] {}, void.class);
    Lib.checkMethod(clsCondition, "wakeAll", new Class[] {}, void.class);
    Lib.checkMethod(clsCondition2, "sleep", new Class[] {}, void.class);
    Lib.checkMethod(clsCondition2, "wake", new Class[] {}, void.class);
    Lib.checkMethod(clsCondition2, "wakeAll", new Class[] {}, void.class);

    Lib.checkDerivation(clsRider, clsRiderInterface);

    Lib.checkConstructor(clsRider, new Class[] {});
    Lib.checkMethod(clsRider, "initialize", new Class[] {clsRiderControls, aclsInt}, void.class);

    Lib.checkDerivation(clsElevatorController, clsElevatorControllerInterface);

    Lib.checkConstructor(clsElevatorController, new Class[] {});
    Lib.checkMethod(
        clsElevatorController, "initialize", new Class[] {clsElevatorControls}, void.class);
  }