public class SOMToolboxMain extends Object
SOMToolboxApp
interface.Constructor and Description |
---|
SOMToolboxMain() |
Modifier and Type | Method and Description |
---|---|
private static boolean |
invokeMainClass(ArrayList<Class<? extends SOMToolboxApp>> runnables,
String runable,
String[] cleanArgs,
boolean useGUI) |
static void |
main(String[] args)
Central Main for SOMToolbox.
|
private static void |
printAvailableRunnables(int screenWidth,
ArrayList<Class<? extends SOMToolboxApp>> runnables) |
private static void |
printHelp() |
static void |
printVersion(String executable) |
private static void |
showAvailableRunnables(ArrayList<Class<? extends SOMToolboxApp>> runnables,
String[] args) |
private static boolean |
tryInvokeMain(Class<?> cls,
String[] args,
boolean useGUI) |
public static void main(String[] args)
args
- the command line argsprivate static void showAvailableRunnables(ArrayList<Class<? extends SOMToolboxApp>> runnables, String[] args)
runnables
- ArrayList
of available runnables.args
- command line arguments.private static boolean invokeMainClass(ArrayList<Class<? extends SOMToolboxApp>> runnables, String runable, String[] cleanArgs, boolean useGUI)
runnables
- ArrayList of available main-classesrunable
- The main class specified on command linecleanArgs
- the arguments for the main class.useGUI
- true
if the GenericGUI
should be used.true
if invocation was successful, false
otherwise.private static boolean tryInvokeMain(Class<?> cls, String[] args, boolean useGUI)
cls
- the class to search the main in.args
- command line args for the main class invoked.useGUI
- true
if the GenericGUI
should be launched.true
if the class contains a static main(String[])
that was invoked,
false
otherwise.GenericGUI
private static void printHelp()
private static void printAvailableRunnables(int screenWidth, ArrayList<Class<? extends SOMToolboxApp>> runnables)
screenWidth
- the with of the screenrunnables
- ArrayList
of available runnables.public static void printVersion(String executable)