Class Subcommand
java.lang.Object
com.j3d.engine.interact.cmd.base.Command
com.j3d.engine.interact.cmd.args.Subcommand
- All Implemented Interfaces:
Argument
- Direct Known Subclasses:
AbstractTransform, AreaCmd, CameraInfoCmd, CopyCmd, DistanceCmd, EchoCmd, EndCmd, ExitCmd, FilesCmd, LineJoin, ListCmd, LookAtCmd, OrbitCmd, PasteCmd, PolyLineJoin, QuickTranslateCmd, RandomUUIDCmd, RecordCmd, RunCmd, TeleportCmd, TestCmd, ToggleCmd, ToggleVisCmd, TriangleCmd, TypeOf, VolumeCmd
Represents a command that is nested within another command, acting as both a
Command in its own right and as an Argument to its parent command.
This class enables the creation of hierarchical command structures, such as
git commit -m "message". In this example, commit would be a
Subcommand of the main git command.
By default, a subcommand is considered a non-optional argument to its parent.
- Author:
- Lehlogonolo Poole
- See Also:
-
Field Summary
Fields inherited from class Command
aliases, args, description, usages -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the description of this subcommand.getName()Returns the primary name of this subcommand.booleanSpecifies that this subcommand is a required argument for its parent command.Methods inherited from class Command
addNoArgUsage, aliases, aliasStream, args, dispatchToSubcommands, getUsages, hasNoArgs, parseUsages, run, usages, varTaggedArgs
-
Constructor Details
-
Subcommand
-
-
Method Details
-
getName
-
getDescription
Returns the description of this subcommand.- Specified by:
getDescriptionin interfaceArgument- Returns:
- The user-friendly description.
-
isOptional
public boolean isOptional()Specifies that this subcommand is a required argument for its parent command.- Specified by:
isOptionalin interfaceArgument- Returns:
- always
false, as subcommands are not optional.
-