Class Parent
- java.lang.Object
-
- com.github.rvesse.airline.examples.inheritance.Parent
-
- All Implemented Interfaces:
ExampleRunnable
- Direct Known Subclasses:
Child
@Command(name="parent", description="A parent command") public class Parent extends java.lang.Object implements ExampleRunnable
We can use standard Java inheritance with commands and the child commands will inherit options defined on their parents
-
-
Field Summary
Fields Modifier and Type Field Description protected HelpOption<ExampleRunnable>
help
private boolean
parent
-
Constructor Summary
Constructors Constructor Description Parent()
-
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 protected HelpOption<ExampleRunnable> help
-
parent
@Option(name="--parent", description="An option provided by the parent") private boolean parent
-
-
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
-
-