title: Is there an unsupported operation annotation in Java?
body: <p>Are there any annotations in java which mark a method as unsupported?  E.g. Let's say I'm writing a new class which implements the <code>java.util.List</code> interface.  The add() methods in this interface are optional and I don't need them in my implementation and so I to do the following:</p>
  
  <pre><code>public void add(Object obj) {
     throw new UnsupportedOperationException("This impl doesn't support add");
  }
  </code></pre>
  
  <p>Unfortunately, with this, it's not until runtime that one might discover that, in fact, this operation is unsupported.  </p>
  
  <p>Ideally, this would have been caught at compile time and such an annotation (e.g. maybe  <code>@UnsupportedOperation</code>) would nudge the IDE to say to any users of this method, "Hey, you're using an unsupported operation" in the way that using <code>@Deprecated</code> flags Eclipse to highlight any uses of the deprecated item.</p>