public abstract class CmdlineBootLoader extends Object
Acts as the main() program in a diet4j-based application. Based on passed-in parameters, it instantiates a ModuleRegistry, figures out what Modules are available, resolves and activates the top-most Module and all its mandatory dependencies, and runs it.
Modifier and Type | Field and Description |
---|---|
protected static File[] |
theModuleDirectories
The paths to the Module JAR files.
|
protected static ModuleRequirement |
theRootModuleRequirement
The ModuleRequirement for the root Module to start.
|
protected static String[] |
theRunArguments
The arguments to the run
|
protected static String |
theRunClassName
The name of the run class in the root Module, if specified on the command-line.
|
protected static String |
theRunMethodName
The name of the run method in the run class, if specified on the command-line.
|
Modifier | Constructor and Description |
---|---|
protected |
CmdlineBootLoader()
Private constructor to keep this from being instantiated.
|
Modifier and Type | Method and Description |
---|---|
static void |
fatal(String msg)
Print fatal error and quit.
|
static void |
helpAndQuit()
Print help text and quit.
|
static void |
main(String[] args)
The main program from the Java perspective: just a shell that catches exceptions.
|
protected static File[] theModuleDirectories
protected static String theRunClassName
protected static String theRunMethodName
protected static ModuleRequirement theRootModuleRequirement
protected static String[] theRunArguments
protected CmdlineBootLoader()
public static void main(String[] args)
args
- arguments provided by the userpublic static void helpAndQuit()
public static void fatal(String msg)
msg
- the error messageCopyright © 2018. All rights reserved.