org.nlogo.api
Class DefaultClassManager

java.lang.Object
  extended by org.nlogo.api.DefaultClassManager
All Implemented Interfaces:
ClassManager

public abstract class DefaultClassManager
extends Object
implements ClassManager


Constructor Summary
DefaultClassManager()
           
 
Method Summary
 List<String> additionalJars()
           
 void clearAll()
          Default does nothing
 StringBuilder exportWorld()
          Default exports nothing
 void importWorld(List<String[]> lines, ExtensionManager reader, ImportErrorHandler handler)
          Default loads nothing
abstract  void load(PrimitiveManager primManager)
          Loads the primitives in the extension.
 ExtensionObject readExtensionObject(ExtensionManager em, String typeName, String value)
          Default defines no extension objects, thus, we cannot read any extension objects
 void runOnce(ExtensionManager em)
          Empty implementation.
 void unload()
          Empty implementation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultClassManager

public DefaultClassManager()
Method Detail

runOnce

public void runOnce(ExtensionManager em)
             throws ExtensionException
Empty implementation.

Specified by:
runOnce in interface ClassManager
Throws:
ExtensionException

load

public abstract void load(PrimitiveManager primManager)
                   throws ExtensionException
Loads the primitives in the extension. This is called once per model compilation.

Specified by:
load in interface ClassManager
Parameters:
primManager - The manager to transport the primitives to NetLogo
Throws:
ExtensionException

unload

public void unload()
            throws ExtensionException
Empty implementation.

Specified by:
unload in interface ClassManager
Throws:
ExtensionException

exportWorld

public StringBuilder exportWorld()
Default exports nothing

Specified by:
exportWorld in interface ClassManager
Returns:
a StringBuilder containing all the data to export if the StringBuilder is empty no section is written

importWorld

public void importWorld(List<String[]> lines,
                        ExtensionManager reader,
                        ImportErrorHandler handler)
                 throws ExtensionException
Default loads nothing

Specified by:
importWorld in interface ClassManager
Parameters:
lines - A list of lines exported by this extension the lines are broken up into an array delimited by commas
reader - An interface that allows the extension to read NetLogo objects
handler - An interface that allows the extensions to report non-fatal errors during the import
Throws:
ExtensionException

clearAll

public void clearAll()
Default does nothing

Specified by:
clearAll in interface ClassManager

readExtensionObject

public ExtensionObject readExtensionObject(ExtensionManager em,
                                           String typeName,
                                           String value)
                                    throws ExtensionException,
                                           CompilerException
Default defines no extension objects, thus, we cannot read any extension objects

Specified by:
readExtensionObject in interface ClassManager
Parameters:
em - An interface that allows the extension to read NetLogo objects
typeName - The type of ExtensionObject to be returned
value - The string representation of the object
Throws:
ExtensionException
CompilerException

additionalJars

public List<String> additionalJars()
Specified by:
additionalJars in interface ClassManager