log.debug("classFiles="+classFiles);
    void checkAndCompileAllClasses() {        CacheEntry cacheEntry;        Enumeration e = _filesToWatch.objectEnumerator();        NSMutableArray filesToCompile  = new NSMutableArray();        while(e.hasMoreElements()) {            cacheEntry = (CacheEntry)e.nextElement();            if(cacheEntry.needsRefresh()) {                filesToCompile.addObject(cacheEntry);            }        }        if(filesToCompile.count() > 0) {            Compiler compiler = new Compiler(filesToCompile.objects(), _destinationPath);            if(compiler.compile()) {                e = filesToCompile.objectEnumerator();                while(e.hasMoreElements()) {                    cacheEntry = (CacheEntry)e.nextElement();                    classFiles.addObject(cacheEntry);                }                boolean didReset = false;                boolean didResetModelGroup = false;                CompilerClassLoader cl = null;                e = classFiles.objectEnumerator();                while(e.hasMoreElements()) {                    cacheEntry = (CacheEntry)e.nextElement();                    String className = cacheEntry.classNameWithPackage();                    try {                        if(cl == null)			    cl = new CompilerClassLoader(_destinationPath, activeLoader);                        //   Object o = Class.forName(className).newInstance();                        Class class_ = cl.loadClass(className, true);                        // the whole magic is in these lines                        Class oldClass_ = classForName(cacheEntry.className());                        setClassForName(class_, className);                        if(oldClass_ != null && !cacheEntry.className().equals(className)) {                            setClassForName(class_, cacheEntry.className());                        }                        if(!didReset) {                            com.webobjects.appserver.WOApplication.application()._removeComponentDefinitionCacheContents();                            NSKeyValueCoding.DefaultImplementation._flushCaches();                            NSKeyValueCoding._ReflectionKeyBindingCreation._flushCaches();                            NSKeyValueCoding.ValueAccessor._flushCaches();                            didReset = true;                        }                        if(WODirectAction.class.isAssignableFrom(class_)) {                            WOApplication app = WOApplication.application();                            WORequestHandler currentDAHandler = app.requestHandlerForKey(app.directActionRequestHandlerKey());                            WODirectActionRequestHandler handler = null;                            if (currentDAHandler instanceof ERXDirectActionRequestHandler)                                 handler = new ERXDirectActionRequestHandler(cacheEntry.className(), "default", false);                            else                                 handler = new WODirectActionRequestHandler(cacheEntry.className(), "default", false);                            boolean directActionIsDefault = currentDAHandler == app.defaultRequestHandler();                            app.registerRequestHandler(handler, app.directActionRequestHandlerKey());                            if(directActionIsDefault)                                app.setDefaultRequestHandler(handler);                            log.info("WODirectAction loaded: "+ cacheEntry.className());                        }                        if(WOComponent.class.isAssignableFrom(class_)) {                            WOContext context = new WOContext(new WORequest("GET", "/", "1.0", null, null, null));                            WOApplication.application().pageWithName(cacheEntry.className(), context)._componentDefinition().componentInstanceInContext(context); // mark an instance as locked                        }                        if(EOEnterpriseObject.class.isAssignableFrom(class_) && !didResetModelGroup) {                            EOModelGroup.setDefaultGroup(ERXModelGroup.modelGroupForLoadedBundles());                            didResetModelGroup = true;                        }                        cacheEntry.update();                        // sparkle dust ends here                    } catch(ClassNotFoundException ex) {                        throw new RuntimeException("Could not load the class "+ className + " with exception:" + ex.toString());                    }                }                NSNotificationCenter.defaultCenter().postNotification(CompilerProxyDidCompileClassesNotification, classFiles);            }        }    }