Class ScreenRegistry

java.lang.Object
no.ntnu.principes.util.ScreenRegistry

public class ScreenRegistry extends Object
Handles automatic registration of application screens. Uses reflection to locate and register all screen classes in the view package.
  • Constructor Details

    • ScreenRegistry

      public ScreenRegistry()
  • Method Details

    • registerScreens

      public static void registerScreens(ScreenController controller)
      Automatically discovers and registers all screen classes with the controller. Scans for classes extending BaseScreen and instantiates them.
      Parameters:
      controller - The controller to register screens with
      Throws:
      RuntimeException - If registration fails due to reflection or instantiation errors