java.lang.Object
com.github.rvesse.airline.model.GlobalMetadata<T>
Represents metadata about a CLI
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<HelpSection> private final List
<CommandGroupMetadata> private final CommandMetadata
private final List
<CommandMetadata> private final String
private final String
private final List
<OptionMetadata> private final ParserMetadata
<T> private final List
<GlobalRestriction> -
Constructor Summary
ConstructorsConstructorDescriptionGlobalMetadata
(String name, String description, Iterable<OptionMetadata> options, CommandMetadata defaultCommand, Iterable<CommandMetadata> defaultGroupCommands, Iterable<CommandGroupMetadata> commandGroups, Iterable<GlobalRestriction> restrictions, Iterable<HelpSection> baseHelpSections, ParserMetadata<T> parserConfig) -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
checkForSuppressedCommands
(CommandGroupMetadata group, String groupPath) private static void
checkForSuppressedCommands
(List<CommandMetadata> commands, CommandMetadata defaultCommand, String groupName) Gets the base help sections used by all commands unless specifically overridden by individual commandsGets the command groups for the CLIGets the default command for the CLIGets the default group of commands for the CLI i.e.Gets the description of the CLIgetName()
Gets the name of the CLIGets the global scoped optionsGets the parser configuration for the CLIGets the global restrictionsprivate static void
suppressedCommand
(Class<?> cls, CommandMetadata cmd, String groupName) toString()
-
Field Details
-
name
-
description
-
options
-
defaultCommand
-
defaultGroupCommands
-
commandGroups
-
parserConfig
-
restrictions
-
baseHelpSections
-
-
Constructor Details
-
GlobalMetadata
public GlobalMetadata(String name, String description, Iterable<OptionMetadata> options, CommandMetadata defaultCommand, Iterable<CommandMetadata> defaultGroupCommands, Iterable<CommandGroupMetadata> commandGroups, Iterable<GlobalRestriction> restrictions, Iterable<HelpSection> baseHelpSections, ParserMetadata<T> parserConfig)
-
-
Method Details
-
checkForSuppressedCommands
-
checkForSuppressedCommands
private static void checkForSuppressedCommands(List<CommandMetadata> commands, CommandMetadata defaultCommand, String groupName) -
suppressedCommand
-
getName
Gets the name of the CLI- Returns:
- Name
-
getDescription
Gets the description of the CLI- Returns:
- Description
-
getOptions
Gets the global scoped options- Returns:
- Options
-
getDefaultCommand
Gets the default command for the CLI- Returns:
- Default command
-
getDefaultGroupCommands
Gets the default group of commands for the CLI i.e. commands that don't need a group to be specified- Returns:
- Default group commands
-
getCommandGroups
Gets the command groups for the CLI- Returns:
- Command groups
-
getRestrictions
Gets the global restrictions- Returns:
- Global restrictions
-
getBaseHelpSections
Gets the base help sections used by all commands unless specifically overridden by individual commands- Returns:
- Base help sections
-
getParserConfiguration
Gets the parser configuration for the CLI- Returns:
- Parser configuration
-
toString
-