Interface CommandRegistration
- All Known Implementing Classes:
CommandRegistration.DefaultCommandRegistration
public interface CommandRegistration
Interface defining a command registration endpoint.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Spec defining an alias.static class
static interface
Builder interface forCommandRegistration
.static interface
Interface used to supply instance of aCommandRegistration.Builder
.static class
static class
static class
static class
static class
static class
static class
static class
static interface
Spec defining an error handling.static interface
Spec defining an exit code.static interface
static interface
Spec defining help options.static enum
Enumeration of option arity values.static interface
Interface used to modify option long name.static interface
Spec defining an option.static interface
Encapsulates info forCommandRegistration.TargetSpec
.static interface
Spec defining a target. -
Method Summary
Modifier and TypeMethodDescriptionstatic CommandRegistration.Builder
builder()
Gets a new instance of aCommandRegistration.Builder
.Gets an aliases.GetAvailability
for a commandGets a command for this registration.Get description for a command.Gets an exception resolvers.Gets an exit code.getGroup()
Get group for a command.Gets a help option info.Gets anInteractionMode
.Gets an options.Gets target info.boolean
isHidden()
Returns if command is hidden.
-
Method Details
-
getCommand
String getCommand()Gets a command for this registration.- Returns:
- command
-
getInteractionMode
InteractionMode getInteractionMode()Gets anInteractionMode
.- Returns:
- the interaction mode
-
getGroup
String getGroup()Get group for a command.- Returns:
- the group
-
isHidden
boolean isHidden()Returns if command is hidden.- Returns:
- true if command is hidden
-
getDescription
String getDescription()Get description for a command.- Returns:
- the description
-
getAvailability
Availability getAvailability()GetAvailability
for a command- Returns:
- the availability
-
getTarget
CommandRegistration.TargetInfo getTarget()Gets target info.- Returns:
- the target info
-
getOptions
List<CommandOption> getOptions()Gets an options.- Returns:
- the options
-
getAliases
List<CommandAlias> getAliases()Gets an aliases.- Returns:
- the aliases
-
getExitCode
CommandExitCode getExitCode()Gets an exit code.- Returns:
- the exit code
-
getExceptionResolvers
List<CommandExceptionResolver> getExceptionResolvers()Gets an exception resolvers.- Returns:
- the exception resolvers
-
getHelpOption
CommandRegistration.HelpOptionInfo getHelpOption()Gets a help option info.- Returns:
- the help option info
-
builder
Gets a new instance of aCommandRegistration.Builder
.- Returns:
- a new builder instance
-