robi.sim.code
Class SimCodeLoader

java.lang.Object
  |
  +--robi.sim.code.SimCodeLoader
All Implemented Interfaces:
java.lang.Runnable

public class SimCodeLoader
extends java.lang.Object
implements java.lang.Runnable

Author:
Reto Witschi This class loads LeJos Code to run in the simulation

Nested Class Summary
(package private) static class SimCodeLoader.classfnfilter
           
 
Field Summary
private  java.lang.Class loadedClass
           
private  java.lang.Thread me
           
 
Constructor Summary
SimCodeLoader(java.lang.Class cl)
           
 
Method Summary
static java.lang.Object[] getClasses(java.lang.String path)
          Searches for LeJos classes on a specified path Only classes with a main method will be returned
 void pauseCode()
          Pauses the LeJos Code running
 void run()
          Implementation of the run() from Interface Runnable Executes the loaded LeJos code in a own thread
 void startCode()
          Creates (if needed) and starts the LeJos Code which is loaded
 void stopCode()
          Stops the LeJos Code Loaded
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

me

private java.lang.Thread me

loadedClass

private java.lang.Class loadedClass
Constructor Detail

SimCodeLoader

public SimCodeLoader(java.lang.Class cl)
Method Detail

startCode

public void startCode()
Creates (if needed) and starts the LeJos Code which is loaded


pauseCode

public void pauseCode()
Pauses the LeJos Code running


stopCode

public void stopCode()
Stops the LeJos Code Loaded


run

public void run()
Implementation of the run() from Interface Runnable Executes the loaded LeJos code in a own thread

Specified by:
run in interface java.lang.Runnable

getClasses

public static java.lang.Object[] getClasses(java.lang.String path)
Searches for LeJos classes on a specified path Only classes with a main method will be returned

Parameters:
path - Path where the LeJos classes are located
Returns:
Object-array with the found LeJos classes (Typ: Class)