com.webobjects.appserver.WOApplication.application()._removeComponentDefinitionCacheContents();
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(); WODirectActionRequestHandler handler = new WODirectActionRequestHandler(cacheEntry.className(), "default", false); boolean directActionIsDefault = app.requestHandlerForKey(app.directActionRequestHandlerKey()) == app.defaultRequestHandler(); app.registerRequestHandler(handler, app.directActionRequestHandlerKey()); if(directActionIsDefault) app.setDefaultRequestHandler(handler); cat.info("WODirectAction loaded: "+ cacheEntry.className()); } if(EOEnterpriseObject.class.isAssignableFrom(class_) && !didResetModelGroup) { EOModelGroup.setDefaultGroup(ERXModelGroup.modelGroupForLoadedBundles()); didResetModelGroup = true; }
    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()) {                CompilerClassLoader cl = null;                e = filesToCompile.objectEnumerator();                while(e.hasMoreElements()) {                    cacheEntry = (CacheEntry)e.nextElement();                    String className = cacheEntry.classNameWithPackage();                    try {                        if(cl == null)			    cl = new CompilerClassLoader(_destinationPath);                        //   Object o = Class.forName(className).newInstance();                        Class class_ = cl.loadClass(className, true);                        // the whole magic is in these two lines                        setClassForName(class_, className);                        com.webobjects.appserver.WOApplication.application()._removeComponentDefinitionCacheContents();                        cacheEntry.update();                        // sparkle dust ends here			NSNotificationCenter.defaultCenter().postNotification(CompilerProxyDidCompileClassesNotification, className);                    } catch(ClassNotFoundException ex) {                        throw new RuntimeException("Could not load the class "+ className + " with exception:" + ex.toString());                    }                }            }        }    }