@Group
The @Group
annotation is used to specify group information. This may be done as an alternative or in addition to using the relevant fields of the @Command
or @Cli
annotations to specify groups.
@Command
classFor example:
@Command(name = "group-member")
@Group(name = "advanced",
defaultCommand = GroupMember.class,
commands = { Tool.class })
public class GroupMember { }
Here we use the @Group
annotation to place our command in the advanced
group. We also specify that we are the default command for that group and that the group also contains the Tool.class
command.
@Cli
When used as an argument to an @Cli
annotation via the groups
field then we must specify all the commands in the commands
field of the @Group
annotation e.g.
@Cli(name = "cli",
groups = {
@Group(name = "advanced",
defaultCommand = GroupMember.class,
commands = { GroupMember.class, Tool.class })
})
public class GroupCli { }
This documentation is itself open source and lives in GitHub under the docs/ directory.
I am not a professional technical writer and as the developer of this software I can often make assumptions of
knowledge that you as a user reading this may not have. Improvements to the documentation are always welcome, if you
have suggestions for the documentation please submit pull requests to the main
branch.