Class BadGrandchild

  • All Implemented Interfaces:
    ExampleRunnable

    @Command(name="bad-grandchild",
             description="An illegal command which attempts to overrides an option defined by a parent without explicitly declaring the override")
    public class BadGrandchild
    extends Child
    When inheriting from existing classes the default behaviour is to prevent overriding of options as Airline assumes the conflicting definitions are an error on the part of the developer. See GoodGrandchild for an example of how to do option overrides correctly.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean parent
      Trying to override the option here will fail because we didn't explicitly state we were overriding
      • Fields inherited from class com.github.rvesse.airline.examples.inheritance.Parent

        help
    • Constructor Summary

      Constructors 
      Constructor Description
      BadGrandchild()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)  
      • Methods inherited from class com.github.rvesse.airline.examples.inheritance.Child

        run
      • Methods inherited from class java.lang.Object

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

      • parent

        @Option(name="--parent",
                description="An option can be overridden if we are explicit about it")
        private boolean parent
        Trying to override the option here will fail because we didn't explicitly state we were overriding
    • Constructor Detail

      • BadGrandchild

        public BadGrandchild()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)