Class Modules
java.lang.Object
com.github.rvesse.airline.examples.modules.Modules
- All Implemented Interfaces:
ExampleRunnable
@Command(name="modules",
description="A command that demonstrates the use of modules to group together sets of options for composition and reuse")
public class Modules
extends Object
implements ExampleRunnable
If you have some set of options that make sense together you can modularize
them out as a class and inject them into your actual command class
This is particularly useful if you want to avoid using inheritance for options, especially in cases where different commands may use different combinations of some common option sets
-
Field Summary
FieldsModifier and TypeFieldDescriptionA field marked withAirlineModule
will also be scanned for optionsprivate HelpOption
<ExampleRunnable> A field marked withAirlineModule
will also be scanned for options -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
help
-
credentials
A field marked withAirlineModule
will also be scanned for options -
verbosity
A field marked withAirlineModule
will also be scanned for options
-
-
Constructor Details
-
Modules
public Modules()
-
-
Method Details
-
main
-
run
public int run()Description copied from interface:ExampleRunnable
Runs the command and returns an exit code that the application should return- Specified by:
run
in interfaceExampleRunnable
- Returns:
- Exit code
-