Class HelpCmd
java.lang.Object
com.j3d.engine.interact.cmd.base.Command
com.j3d.engine.interact.cmd.commands.HelpCmd
A command that provides help information about other commands.
When invoked without arguments, it lists all available top-level commands. When invoked with a command name, it displays the description, aliases, and usages for that specific command.
It leverages InlineHTML to format the output for better readability
in the UI.
Aliases: h, use, usage
- Author:
- Lehlogonolo Poole
- See Also:
-
Field Summary
Fields inherited from class com.j3d.engine.interact.cmd.base.Command
aliases, args, description, usages -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCommands(AtomicInteger maxCmd, int max, StringBuilder stringBuilder) voidrun(Invoker invoker, SafeJLabel logLabel, String aliasUsed, Object[] args, ArrayList<TaggedArgValue<?>> taggedArgs) The method to be overridden by subclasses to implement command functionality.Methods inherited from class com.j3d.engine.interact.cmd.base.Command
addNoArgUsage, aliases, aliasStream, args, dispatchToSubcommands, getUsages, hasNoArgs, parseUsages, usages, varTaggedArgs
-
Constructor Details
-
HelpCmd
public HelpCmd()
-
-
Method Details
-
run
public void run(Invoker invoker, SafeJLabel logLabel, String aliasUsed, Object[] args, ArrayList<TaggedArgValue<?>> taggedArgs) Description copied from class:CommandThe method to be overridden by subclasses to implement command functionality. -
getCommands
private static ArrayList<Command> getCommands(AtomicInteger maxCmd, int max, StringBuilder stringBuilder)
-