예제 #1
0
 /**
  * Get instance of singleton.
  *
  * @return The instance of the pathfinder class.
  */
 public static synchronized Pathfinder getInstance() {
   if (instance == null) {
     instance = new Pathfinder();
     instance.setUncaughtExceptionHandler(PathfinderCrashHandler.getInstance());
   }
   return instance;
 }
예제 #2
0
 /** Restart the pathfinder by creating a new instance and starting this one. */
 public static synchronized void restartPathfinder() {
   if (instance != null) {
     instance.saveShutdown();
     StoppableStorage.getInstance().remove(instance);
   }
   instance = new Pathfinder();
   instance.setUncaughtExceptionHandler(PathfinderCrashHandler.getInstance());
 }