Package jflex.gui

Class GeneratorThread

  • All Implemented Interfaces:
    java.lang.Runnable

    public class GeneratorThread
    extends java.lang.Thread
    Low priority thread for code generation (low priority that gui has time for screen updates)
    Version:
    JFlex 1.9.1
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.lang.String inputFile
      input file setting from GUI
      (package private) java.lang.String outputDir
      output directory
      (package private) MainFrame parent
      main UI component, likes to be notified when generator finishes
      private static boolean running
      there must be at most one instance of this Thread running
      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • Constructor Summary

      Constructors 
      Constructor Description
      GeneratorThread​(MainFrame parent, java.lang.String inputFile, java.lang.String outputDir)
      Create a new GeneratorThread, but do not run it yet.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void run()
      Runs the generator thread.
      • Methods inherited from class java.lang.Thread

        activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • running

        private static volatile boolean running
        there must be at most one instance of this Thread running
      • inputFile

        java.lang.String inputFile
        input file setting from GUI
      • outputDir

        java.lang.String outputDir
        output directory
      • parent

        final MainFrame parent
        main UI component, likes to be notified when generator finishes
    • Constructor Detail

      • GeneratorThread

        public GeneratorThread​(MainFrame parent,
                               java.lang.String inputFile,
                               java.lang.String outputDir)
        Create a new GeneratorThread, but do not run it yet.
        Parameters:
        parent - the frame, main UI component
        inputFile - input file from UI settings
        outputDir - output directory from UI settings
    • Method Detail

      • run

        public void run()
        Runs the generator thread. Only one instance of it can run at any time.
        Specified by:
        run in interface java.lang.Runnable
        Overrides:
        run in class java.lang.Thread