Annotation Interface Command
-
Optional Element Summary
-
Element Details
-
command
String[] commandDefine command as an array. Given that command should becommand1 sub1
it can be defined as:command = { "command1", "sub1" } command = "command1 sub1"
Values are split and trimmed meaning spaces doesn't matter.Supported at the type level as well as at the method level! When used at the type level, all method-level mappings inherit this primary command to use it as a prefix.
@Command(command = "command1") class MyCommands { @Command(command = "sub1") void sub1(){} }
- Returns:
- the command as an array
- Default:
- {}
-
alias
String[] aliasDefine alias as an array. Given that alias should bealias1 sub1
it can be defined as:command = { "alias1", "sub1" } command = "alias1 sub1"
Values are split and trimmed meaning spaces doesn't matter.Supported at the type level as well as at the method level! When used at the type level, all method-level mappings inherit this primary alias to use it as a prefix.
@Command(alias = "alias1") class MyCommands { @Command(alias = "sub1") void sub1(){} }
- Returns:
- the aliases as an array
- Default:
- {}
-
group
String groupDefine a command group.Supported at the type level as well as at the method level! When used at the type level, all method-level group inherit this primary group. Can be overridden on method-level.
- Returns:
- the command group
- Default:
- ""
-
description
String descriptionDefine a command description.Supported at the type level as well as at the method level! When used at the type level, all method-level descriptions inherit this primary field. Can be overridden on method-level.
- Returns:
- the command description
- Default:
- ""
-
interactionMode
InteractionMode[] interactionModeDefine interaction mode for a command as a hint when command should be available. For example presense of some commands doesn't make sense if shell is running as non-interactive mode and vice versa.Supported at the type level as well as at the method level! When used at the type level, all method-level mappings inherit this primary field. Type is an array to be able to indicate that default don't have anyting defined.
- Returns:
- interaction modes
- Default:
- {}
-