Package org.nlogo.api

Examples of org.nlogo.api.ClassManager


      if (myClassLoader == null) {
        return;
      }

      ClassManager classManager =
          getClassManager(jarPath, myClassLoader, errors);

      if (classManager == null) {
        return;
      }

      JarContainer theJarContainer = jars.get(jarPath);

      long modified = getModified(jarPath, errors);

      // Check to see if he have seen this Jar before
      if ((theJarContainer == null) ||
          (theJarContainer.modified != modified)) {
        if (theJarContainer != null) {
          theJarContainer.classManager.unload(this);
        }
        theJarContainer = new JarContainer(extName, jarPath, myClassLoader, modified);
        try {
          // compilation tests shouldn't initialize the extension
          if (!workspace.compilerTestingMode()) {
            classManager.runOnce(this);
          }
        } catch (org.nlogo.api.ExtensionException ex) {
          System.err.println("Error while initializing extension.");
          System.err.println("Error is: " + ex);
          throw ex;
        }
        jars.put(jarPath, theJarContainer);
      }

      // Check to see if it has been loaded into the model
      if (!theJarContainer.loaded) {
        jarsLoaded++;
        theJarContainer.loaded = true;
        theJarContainer.classManager = classManager;
        theJarContainer.primManager = new ExtensionPrimitiveManager(extName);
        classManager.load(theJarContainer.primManager);
      }

      // Jars that have been removed won't get this flag set
      theJarContainer.live = true;
View Full Code Here

TOP

Related Classes of org.nlogo.api.ClassManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.