|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.xoev.xdomea.viewer.main.AbstractMain
public abstract class AbstractMain
Diese abstrakte Klasse fungiert als Basis für alle Klassen mit einer main-Methode.
Sie enthält Funktionen zum automatischen Auslesen der Kommandozeilenparameter.
Die implementierende muss die beiden Methoden getOptionArr()
und
execute(CommandLine)
implementieren.
Constructor Summary | |
---|---|
AbstractMain()
|
Method Summary | |
---|---|
protected abstract void |
execute(org.apache.commons.cli.CommandLine commandLine)
führt die gewünschte Aktion aus |
protected abstract org.apache.commons.cli.Option[] |
getOptionArr()
|
protected org.apache.commons.cli.CommandLine |
parseCommandLine(String[] args)
parst die Kommandozeile nach den übergebenen Parametern |
protected void |
run(String[] args)
überprüft die übergebenen KeyValue-Paare und ruft die Methode execute(CommandLine) auf mit einem Kommandozeilen-Instanz auf,
die alle Kommandozeile KeyValue-Paare enthält |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractMain()
Method Detail |
---|
protected abstract org.apache.commons.cli.Option[] getOptionArr()
protected abstract void execute(org.apache.commons.cli.CommandLine commandLine)
commandLine
- eine Kommandozeilen-Instanz mit den beim Aufruf übergebenen Parameternprotected org.apache.commons.cli.CommandLine parseCommandLine(String[] args) throws org.apache.commons.cli.ParseException
args
- ein String-Array mit KeyValue-Paaren
org.apache.commons.cli.ParseException
protected void run(String[] args)
execute(CommandLine)
auf mit einem Kommandozeilen-Instanz auf,
die alle Kommandozeile KeyValue-Paare enthält
args
- ein String-Array mit KeyValue-Paaren
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |