|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectproper.core.ProperObject
proper.core.ArgumentObject
proper.app.Application
public abstract class Application
This class functions as a Ancestor for all classes that are called from
commandline with parameters.
For a complete list of commandline parameters just run it with the option
"-help".
Field Summary |
---|
Fields inherited from interface proper.core.ProperInterface |
---|
VERSION |
Constructor Summary | |
---|---|
Application()
initializes the object |
Method Summary | |
---|---|
void |
checkCommandLine()
checks whether all necessary parameters are provided |
static Application |
createInstance(java.lang.String classname)
creates a new instance from the given classname |
void |
fromXML(Element node)
reads all the data stored in the children of the given node (= container). |
void |
parameterError()
prints the usage if not all necessary parameters were provided |
void |
printDescription()
prints a short description of this class |
void |
printUsage()
prints the usage of the application, with all necessary parameters |
boolean |
run()
runs the application with previously set arguments |
boolean |
run(java.lang.String[] args)
processes the commandline parameters and runs the application |
void |
setArgs(CommandLine cl)
sets the arguments from the given CommandLine object |
void |
setArgs(java.lang.String[] args)
sets the arguments to use with the run() method |
java.lang.String |
toString()
outputs the current parameters |
Element |
toXML()
returns the content in an XML structure, where the actual data is stored in the children of the returned Element, i.e. |
Methods inherited from class proper.core.ArgumentObject |
---|
fixAdditionalArg |
Methods inherited from class proper.core.ProperObject |
---|
addListener, addOutput, classInVerbose, debugprint, debugprint, debugprint, debugprint, debugprintln, debugprintln, debugprintln, debugprintln, debugprintln, getListeners, getRuntime, getVerbose, getVerboseLevel, getVerboseLevelForClass, getVerboseString, getVerboseStringForClass, notifyListener, notifyListeners, print, print, print, print, println, println, println, println, println, printMemory, removeListener, setOutput, setVerbose, setVerboseLevel, setVerboseString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Application()
Method Detail |
---|
public static Application createInstance(java.lang.String classname)
public void checkCommandLine()
checkCommandLine
in interface CommandLineInterface
public void parameterError()
parameterError
in interface CommandLineInterface
public void printDescription()
printDescription
in interface CommandLineInterface
public void printUsage()
printUsage
in interface CommandLineInterface
public void setArgs(java.lang.String[] args)
run()
method
args
- the arguments to userun()
public void setArgs(CommandLine cl)
setArgs
in interface CommandLineInterface
cl
- the commandline object containing the parameterspublic boolean run() throws java.lang.Exception
java.lang.Exception
setArgs(String[])
public boolean run(java.lang.String[] args) throws java.lang.Exception
run
in interface CommandLineInterface
java.lang.Exception
public java.lang.String toString()
toString
in class ProperObject
public Element toXML()
toXML
in interface XMLAccessInterface
CommandLine.toXML()
public void fromXML(Element node)
CommandLine.fromXML()
method
fromXML
in interface XMLAccessInterface
node
- the Element node containing the data in its childrenCommandLine.fromXML(Element)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |