public class SkbShellFactory extends Object
| Modifier and Type | Field and Description |
|---|---|
static SkbShellCommandCategory |
SIMPLE_COMMANDS
A category for standard commands.
|
| Constructor and Description |
|---|
SkbShellFactory() |
| Modifier and Type | Method and Description |
|---|---|
static SkbShellArgument |
newArgument(String argument,
boolean isOptional,
SkbShellArgumentType type,
Object[] valueSet,
String description,
String addedHelp)
Returns a new shell argument, use the factory to create one.
|
static SkbShellArgument[] |
newArgumentArray(SkbShellArgument... args)
Returns a new argument array.
|
static SkbShellCommandCategory |
newCategory(String category,
String description)
Returns a new shell command category, use the
SkbShellFactory to create a new object. |
static SkbShellCommand |
newCommand(String command,
SkbShellArgument[] arguments,
SkbShellCommandCategory category,
String description,
String addedHelp)
Returns a new shell command, use the factory to create one.
|
static SkbShellCommand |
newCommand(String command,
SkbShellArgument argument,
SkbShellCommandCategory category,
String description,
String addedHelp)
Returns a new shell command, use the factory to create one.
|
static SkbShellCommand |
newCommand(String command,
SkbShellCommandCategory category,
String description,
String addedHelp)
Returns a new shell command without formal arguments, use the factory to create one.
|
static SkbShell |
newShell()
Returns a new shell with the default identifier and the default STG and console activated.
|
static SkbShell |
newShell(MessageRenderer renderer)
Returns a new shell with the default identifier and the given STG and console activated.
|
static SkbShell |
newShell(MessageRenderer renderer,
boolean useConsole)
Returns a new shell with given STG and console flag.
|
static SkbShell |
newShell(String id)
Returns a new shell with a given identifier, standard STGroup and console activated.
|
static SkbShell |
newShell(String id,
boolean useConsole)
Returns a new shell with given identifier and console flag with standard STGroup.
|
static SkbShell |
newShell(String id,
MessageRenderer renderer)
Returns a new shell with a given identifier and STGroup plus console activated.
|
static SkbShell |
newShell(String id,
MessageRenderer renderer,
boolean useConsole)
Returns a new shell with given identifier and console flag.
|
public static SkbShellCommandCategory SIMPLE_COMMANDS
public static SkbShell newShell()
public static SkbShell newShell(MessageRenderer renderer)
renderer - a renderer for help messagespublic static SkbShell newShell(MessageRenderer renderer, boolean useConsole)
renderer - a renderer for help messagesuseConsole - flag to use (true) or not to use (false) console, of false then no output will happen (except for errors on runShell() and some help commands)public static SkbShell newShell(String id)
id - new shell with identifierpublic static SkbShell newShell(String id, boolean useConsole)
id - new shell with identifier, uses default if given STG is not validuseConsole - flag to use (true) or not to use (false) console, of false then no output will happenpublic static SkbShell newShell(String id, MessageRenderer renderer)
id - new shell with identifierrenderer - a renderer for help messagespublic static SkbShell newShell(String id, MessageRenderer renderer, boolean useConsole)
id - new shell with identifierrenderer - a renderer for help messagesuseConsole - flag to use (true) or not to use (false) console, of false then no output will happenpublic static SkbShellCommand newCommand(String command, SkbShellArgument[] arguments, SkbShellCommandCategory category, String description, String addedHelp)
command - the actual commandarguments - the command's arguments, can be nullcategory - the command's category, can be nulldescription - the command's descriptionaddedHelp - additional help, can be nullIllegalArgumentException - if command or description was nullpublic static SkbShellCommand newCommand(String command, SkbShellArgument argument, SkbShellCommandCategory category, String description, String addedHelp)
command - the actual commandargument - the command's argument, can be nullcategory - the command's category, can be nulldescription - the command's descriptionaddedHelp - additional help, can be nullIllegalArgumentException - if command or description was nullpublic static SkbShellCommand newCommand(String command, SkbShellCommandCategory category, String description, String addedHelp)
command - the actual commandcategory - the command's category, can be nulldescription - the command's descriptionaddedHelp - additional help, can be nullIllegalArgumentException - if command or description was nullpublic static SkbShellArgument newArgument(String argument, boolean isOptional, SkbShellArgumentType type, Object[] valueSet, String description, String addedHelp)
argument - the actual argument, cannot be blankisOptional - flag for optional (true if optional, false if not)type - the argument's type, cannot be nullvalueSet - the argument's value set if specified, can be nulldescription - the command's description, cannot be nulladdedHelp - a string additional to the description for helpIllegalArgumentException - if argument, type, or description was nullpublic static SkbShellArgument[] newArgumentArray(SkbShellArgument... args)
args - input arguments, any argument being null will be ignoredpublic static SkbShellCommandCategory newCategory(String category, String description)
SkbShellFactory to create a new object.category - the actual categorydescription - the command's descriptionIllegalArgumentException - if command or description was nullCopyright © 2010–2017. All rights reserved.