public abstract class AbstractSCIFIOToolCommand extends AbstractSCIFIOPlugin implements SCIFIOToolCommand
SCIFIOToolCommand
superclass. Has a
runCommand(String...)
entry point which takes care of parsing
arguments, printing command usage, etc...Constructor and Description |
---|
AbstractSCIFIOToolCommand() |
Modifier and Type | Method and Description |
---|---|
String |
commandName()
Default command name is a lower-case version of the class name.
|
protected void |
debug(String msg) |
protected abstract String |
description() |
protected void |
err(String msg) |
protected abstract List<String> |
getExtraArguments()
Each SCIFIOToolCommand implementation should have a
List<String>
Argument field which is multiValued = true and with an
index putting it at the end of the argument list. |
protected abstract String |
getName() |
protected void |
info(String msg) |
protected Location |
location(String source) |
protected abstract void |
run()
Performs the actual tool operations.
|
void |
runCommand(String... args)
Executes this command with the given arguments.
|
protected abstract void |
validateParams()
Very that all parameters were set correctly, in case any need checking that
the
Parameter or Argument can't provide. |
protected void |
warn(String msg) |
getVersion, log
getInfo, getPriority, setInfo, setPriority, toString
context, getContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getVersion, log
getIdentifier
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
public void runCommand(String... args)
SCIFIOToolCommand
runCommand
in interface SCIFIOToolCommand
args
- A list of command line arguments specific to a given commandprotected abstract void run() throws org.kohsuke.args4j.CmdLineException
runCommand(String...)
.org.kohsuke.args4j.CmdLineException
protected abstract String description()
protected abstract String getName()
protected abstract List<String> getExtraArguments()
List<String>
Argument
field which is multiValued = true
and with an
index
putting it at the end of the argument list. The user will be
warned that these arguments were not used.protected abstract void validateParams() throws org.kohsuke.args4j.CmdLineException
Parameter
or Argument
can't provide.org.kohsuke.args4j.CmdLineException
protected void err(String msg)
msg
- Error message to printprotected void warn(String msg)
msg
- Warning message to printprotected void info(String msg)
msg
- Info message to printprotected void debug(String msg)
msg
- Debug statement to printpublic String commandName()
commandName
in interface SCIFIOToolCommand
Copyright © 2015–2022 SCIFIO. All rights reserved.