class KernelState implements Restorable {
public Heap heap;
public ThreadList threads;
public ClassLoaderList classLoaders;
private Stack listeners;
// current listeners waiting for notification of next change.
static class KsMemento implements Memento {
Memento threadsMemento;
Memento cloadersMemento;
Memento heapMemento;
public KernelState restore (KernelState ks) {...}
}
...
}
public class SystemState {
static class Memento {
ChoiceGenerator> curCg;
ChoiceGenerator> nextCg;
int atomicLevel;
ChoicePoint trace;
ThreadInfo execThread;
int id; // the state id
LinkedHashMap