title: Extend class without adding any new fields
body: <p>Say we have a class like this:</p>
  
  <pre><code>class Bar {
    boolean b;
  }
  
  class Foo {
    String zoo;
    Bar bar;
  }
  </code></pre>
  
  <p>and then we have a class that extends Foo:</p>
  
  <pre><code>class Stew extends Foo {
     public Stew(Bar b, String z){
        this.bar = b;
        this.zoo = z;
     }
  }
  </code></pre>
  
  <p>my question is - is there any way to prevent <code>Stew</code> from having any non-method fields that aren't in <code>Foo</code>? In other words, I don't want <code>Stew</code> to have any fields, I just want <code>Stew</code> to implement a constructor and maybe a method or two.</p>
  
  <p>Perhaps there is an <em>annotation</em> I can use, that can do this?</p>
  
  <p>Something like:</p>
  
  <pre><code>@OnlyAddsMethods
  class Stew extends Foo {
     public Stew(Bar b, String z){
        this.bar = b;
        this.zoo = z;
     }
  }
  </code></pre>
  
  <p><strong>purpose</strong> - I am going to serialize <code>Stew</code> to JSON, but I don't want Stew to have any new fields. I want to let any developer working on this file to know that any additional fields will be ignored (or won't be recognized) etc.</p>