Class GlobalMetadata<T>
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 CommandMetadataprivate final List<CommandMetadata> private final Stringprivate final Stringprivate 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 voidcheckForSuppressedCommands(CommandGroupMetadata group, String groupPath) private static voidcheckForSuppressedCommands(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 voidsuppressedCommand(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
-
getDescription
-
getOptions
-
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
-