- java.lang.Object
-
- de.carne.boot.Application
-
public final class Application extends java.lang.ObjectGeneric 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>
TgetMain(java.lang.Class<T> clazz)Gets the currently running ApplicationMain instance.static voidmain(java.lang.String[] args)Application entry point if run as Main class.static intrun(java.lang.String[] args)Application entry point if run from another class (e.g. during tests).
-
-
-
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.
-
-