public abstract class Tool extends Object
Modifier and Type | Field and Description |
---|---|
protected PrintStream |
out
The output stream where this tool writes to.
|
Constructor and Description |
---|
Tool() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isOption(String arg,
String option)
Check if the argument matches the option.
|
protected void |
printNoDatabaseFilesFound(String dir,
String db)
Print to the output stream that no database files have been found.
|
abstract void |
runTool(String... args)
Run the tool with the given output stream and arguments.
|
void |
setOut(PrintStream out)
Sets the standard output stream.
|
protected void |
showUsage()
Print the usage of the tool.
|
protected SQLException |
throwUnsupportedOption(String option)
Throw a SQLException saying this command line option is not supported.
|
protected PrintStream out
public void setOut(PrintStream out)
out
- the new standard output streampublic abstract void runTool(String... args) throws SQLException
args
- the argument listSQLException
protected SQLException throwUnsupportedOption(String option) throws SQLException
option
- the unsupported optionSQLException
protected void printNoDatabaseFilesFound(String dir, String db)
dir
- the directory or nulldb
- the database name or nullprotected void showUsage()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.