Class 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
    • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Parent

        public 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 interface ExampleRunnable
        Returns:
        Exit code