|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.common.tools.ToolRunnerBase
public abstract class ToolRunnerBase
A simple class that manages and runs an implementation of SimpleCmdlineTool. The class contains an abstract factory method, which will create the actual implementation when specialized. This could also have been done with generics, but this is the traditional implementation.
Constructor Summary | |
---|---|
ToolRunnerBase()
|
Method Summary | |
---|---|
protected abstract SimpleCmdlineTool |
makeMyTool()
Factory method. |
void |
runTheTool(java.lang.String... args)
Passes (command line) parameters to the tool. |
protected void |
showMessage(java.lang.String msg)
A template method implementing default behaviour for showing a message (send to stderr). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ToolRunnerBase()
Method Detail |
---|
protected abstract SimpleCmdlineTool makeMyTool()
protected void showMessage(java.lang.String msg)
msg
- The message to displaypublic void runTheTool(java.lang.String... args)
args
- Usually a straight passing of the command line parameters
from a "main" method.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |