Package mars.venus

Class ToolLoader

java.lang.Object
mars.venus.ToolLoader

public class ToolLoader extends Object
This class provides functionality to bring external Mars tools into the Mars system by adding them to its Tools menu. This permits anyone with knowledge of the Mars public interfaces, in particular of the Memory and Register classes, to write applications which can interact with a MIPS program executing under Mars. The execution is of course simulated. The private method for loading tool classes is adapted from Bret Barker's GameServer class from the book "Developing Games In Java".
Version:
August 2005
Author:
Pete Sanderson with help from Bret Barker
  • Constructor Details

    • ToolLoader

      public ToolLoader()
  • Method Details

    • buildToolsMenu

      public JMenu buildToolsMenu()
      Called in VenusUI to build its Tools menu. If there are no qualifying tools or any problems accessing those tools, it returns null. A qualifying tool must be a class in the Tools package that implements MarsTool, must be compiled into a .class file, and its .class file must be in the same Tools folder as MarsTool.class.
      Returns:
      a Tools JMenu if qualifying tool classes are found, otherwise null