Class ModuleReuse
- java.lang.Object
-
- com.github.rvesse.airline.examples.modules.ModuleReuse
-
- All Implemented Interfaces:
ExampleRunnable
@Command(name="module-reuse", description="A command that demonstrates re-use of modules and composition with locally defined options") public class ModuleReuse extends java.lang.Object implements ExampleRunnable
Here we have another command which reuses module classes we've defined and also adds locally defined options, we can
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.String>
args
private HelpOption<ExampleRunnable>
help
private VerbosityModule
verbosity
A field marked withAirlineModule
will also be scanned for options
-
Constructor Summary
Constructors Constructor Description ModuleReuse()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(java.lang.String[] args)
int
run()
Runs the command and returns an exit code that the application should return
-
-
-
Field Detail
-
help
@AirlineModule private HelpOption<ExampleRunnable> help
-
verbosity
@AirlineModule private VerbosityModule verbosity
A field marked withAirlineModule
will also be scanned for options
-
args
@Arguments private java.util.List<java.lang.String> args
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
-
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
-
-