|
NetLogo API version 3.1.5 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ClassManager
Interface specifies the main class of a NetLogo extension. All NetLogo extensions must include a class that implements this interface. Registers primitives with NetLogo and handles extension initialization and deconstruction.
For example:
public class FibonacciExtension extends org.nlogo.api.DefaultClassManager { public void load(org.nlogo.api.PrimitiveManager primManager) { primManager.addPrimitive("first-n-fibs", new Fibonacci()); } }
Method Summary | |
---|---|
void |
load(PrimitiveManager primManager)
Loads the primitives in the extension. |
void |
runOnce(ExtensionManager em)
Initializes the extension. |
void |
unload()
Cleans up the extension. |
Method Detail |
---|
void runOnce(ExtensionManager em) throws ExtensionException
ExtensionException
void load(PrimitiveManager primManager) throws ExtensionException
primManager
- The manager to transport the primitives to NetLogo
ExtensionException
void unload() throws ExtensionException
load
is called.
ExtensionException
|
NetLogo API version 3.1.5 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |