Package ui.repl

Class ReplController


  • public final class ReplController
    extends java.lang.Object
    The ReplController class is used communicate with and control the REPL GUI.

    Communication is done through FXML, through the use of labels in the FXML file and annotations in this Java class.

    Since:
    1.0
    • Constructor Summary

      Constructors 
      Constructor Description
      ReplController()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void clearFields()
      Resets the REPL to its start state.
      (package private) void evaluateInput()
      Evaluates the users input and displays the output.
      (package private) void initialize()
      Runs when the REPL is started up.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ReplController

        public ReplController()
    • Method Detail

      • initialize

        void initialize()
        Runs when the REPL is started up.

        Is used to initialise the Compiler and TableView so that they are ready for use.

      • evaluateInput

        void evaluateInput()
        Evaluates the users input and displays the output.

        The input given by the user is extracted from the TextField, and then compiled by the Compiler. The result is then added to the TextFlow to be displayed.

      • clearFields

        void clearFields()
        Resets the REPL to its start state.

        The input TextField, TableView, output TextFlow, and SymbolTable are all reset.