public class GroupBuilder<C> extends AbstractChildBuilder<CommandGroupMetadata,Cli<C>,CliBuilder<C>>
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,GroupBuilder<C>> |
subGroups |
| Modifier and Type | Method and Description |
|---|---|
CommandGroupMetadata |
build()
Builds the type
|
GroupBuilder<C> |
getSubGroup(String name) |
GroupBuilder<C> |
makeHidden() |
GroupBuilder<C> |
makeVisible() |
GroupBuilder<C> |
parentGroup()
Gets the parent group builder which may be
null if this is a top
level group. |
GroupBuilder<C> |
withCommand(Class<? extends C> command) |
GroupBuilder<C> |
withCommands(Class<? extends C> command,
Class<? extends C>... moreCommands) |
GroupBuilder<C> |
withCommands(Iterable<Class<? extends C>> commands) |
GroupBuilder<C> |
withDefaultCommand(Class<? extends C> defaultCommand) |
GroupBuilder<C> |
withDescription(String description)
Sets the description for the group
|
GroupBuilder<C> |
withHiddenState(boolean hidden) |
GroupBuilder<C> |
withSubGroup(String name) |
parentcheckNotBlank, checkNotEmpty, checkNotNullprotected final Map<String,GroupBuilder<C>> subGroups
public GroupBuilder<C> withDescription(String description)
description - Descriptionpublic GroupBuilder<C> makeHidden()
public GroupBuilder<C> makeVisible()
public GroupBuilder<C> withHiddenState(boolean hidden)
public GroupBuilder<C> withSubGroup(String name)
public GroupBuilder<C> getSubGroup(String name)
public GroupBuilder<C> withDefaultCommand(Class<? extends C> defaultCommand)
public GroupBuilder<C> withCommand(Class<? extends C> command)
public GroupBuilder<C> withCommands(Class<? extends C> command, Class<? extends C>... moreCommands)
public GroupBuilder<C> withCommands(Iterable<Class<? extends C>> commands)
public GroupBuilder<C> parentGroup()
null if this is a top
level group. You may alternatively want to call AbstractChildBuilder.parent() to get
the actual CLI buildernullpublic CommandGroupMetadata build()
AbstractBuilderbuild in class AbstractBuilder<CommandGroupMetadata>Copyright © 2012–2022. All rights reserved.