Module de.carne
Package de.carne.boot

Class Application


  • public final class Application
    extends java.lang.Object
    Generic main class responsible for bootstrapping of the actual application. This also includes the proper setup of the class loader depending on the execution context.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T extends ApplicationMain>
      T
      getMain​(java.lang.Class<T> clazz)
      Gets the currently running ApplicationMain instance.
      static void main​(java.lang.String[] args)
      Application entry point if run as Main class.
      static int run​(java.lang.String[] args)
      Application entry point if run from another class (e.g. during tests).
      • Methods inherited from class java.lang.Object

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

      • main

        public static void main​(java.lang.String[] args)
        Application entry point if run as Main class.
        Parameters:
        args - command line arguments.
      • run

        public static int run​(java.lang.String[] args)
        Application entry point if run from another class (e.g. during tests).
        Parameters:
        args - command line arguments.
        Returns:
        the application status.
      • getMain

        public static <T extends ApplicationMain> T getMain​(java.lang.Class<T> clazz)
        Gets the currently running ApplicationMain instance.
        Type Parameters:
        T - the actual main class type to retrieve.
        Parameters:
        clazz - the actual type of the ApplicationMain class.
        Returns:
        the currently running ApplicationMain class.