ch.aplu.util
Class Main

java.lang.Object
  extended by ch.aplu.util.Main

public class Main
extends java.lang.Object

Main contains a public static void main() entry point and is able to create an instance of another class (by Java reflection), so that its default contructor is invoked. Mainly used to avoid the ugly public static void main() method in beginner's programs. The class name can be provided in three ways:
- as parameter of the main() method
- as an entry with key MainClass in a mainclass.properties file (located in the root of the application jar)
- all classes in the class path that uses the @NoMain annotation (if more than one class is found, a selection box is displayed).
If the application class defines the methods void run() or void main(), these methods are invoked by reflection after the class instance is created.


Method Summary
static void main(java.lang.String[] args)
          Program entry point.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(java.lang.String[] args)
Program entry point. If no argument is given, the class name of the instance to load is searched in the mainclass.properties file (key MainClass) located in the application jar root. If not found, the class path is scanned for classes that have the @NoMain annotation.

Parameters:
args - the name of the class whereof an instance is created