|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fest.swing.launcher.ApplicationLauncher
public class ApplicationLauncher
Understands execution of a Java application from a class that has a "main" method.
The following example shows how to start an application without any arguments:
ApplicationLauncher.application(JavaApp.class).start(); // or ApplicationLauncher.application
("org.fest.swing.application.JavaApp").start
();
The following example shows how to start an application with arguments:
ApplicationLauncher.application
(JavaApp.class).withArgs
("arg1", "arg2").start
(); // or ApplicationLauncher.application
("org.fest.swing.application.JavaApp").withArgs
("arg1", "arg2").start
();
Method Summary | |
---|---|
static ApplicationLauncher |
application(Class<?> applicationType)
Starting point of the fluent interface. |
static ApplicationLauncher |
application(String applicationTypeName)
Starting point of the fluent interface. |
void |
start()
Starts the application. |
ApplicationLauncher |
withArgs(String... newArgs)
Specifies the arguments to pass to the "main" method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ApplicationLauncher application(String applicationTypeName)
applicationTypeName
- the fully qualified name of the class containing the "main" method.
ApplicationStarter
.
UnexpectedException
- if the class specified in the given name cannot be loaded.public static ApplicationLauncher application(Class<?> applicationType)
applicationType
- the class containing the "main" method.
ApplicationStarter
.public ApplicationLauncher withArgs(String... newArgs)
newArgs
- the arguments to pass to the "main" method.
ApplicationStarter
.
NullPointerException
- if newArgs
is null
.public void start()
org.fest.reflect.exception.ReflectionError
- if the "main" method cannot be invoked.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |