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>argsprivate HelpOption<ExampleRunnable>helpprivate VerbosityModuleverbosityA field marked withAirlineModulewill 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 voidmain(java.lang.String[] args)intrun()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 withAirlineModulewill 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:ExampleRunnableRuns the command and returns an exit code that the application should return- Specified by:
runin interfaceExampleRunnable- Returns:
- Exit code
-
-