title: In Java / Spring is there a way to deprecate the usage of an (undeprecated) annotation?
body: <p>In our spring application we have a lot of usage of the <code>@Resource</code> (<code>javax.annotation.Resource</code>) which per our project conventions we want to replace with explicit Spring getter/setter and <code>Required</code> (<code>org.springframework.beans.factory.annotation.Required</code>) and an xml configuration.</p>
  
  <p>So basically something like this:</p>
  
  <pre><code>@Resource
  private MyBean myBean;
  </code></pre>
  
  <p>will be replaced with:</p>
  
  <pre><code>private MyBean myBean;
  [...]
  
  protected MyBean getMyBean()
  {
      return myBean;
  }
  
  @Required
  public void setMyBean(final MyBean myBean)
  {
      this.myBean = myBean;
  }
  </code></pre>
  
  <p>and in the corresponding <code>spring.xml</code> file we would add:</p>
  
  <pre><code>&lt;bean id="someBean" .... &gt;
      [...]
      &lt;property name="myBean" ref="myBean" /&gt;
      [...]
  &lt;/bean&gt;
  </code></pre>
  
  <p>(Not asking whether this is a good approach btw :) )</p>
  
  <p>Now for backwards compatibility (as third parties are using our software) we ideally want to "deprecate" the usage of the <code>@Resource</code> annotation and indicate to users of our software to add the xml configuration if they extend our beans.
  (I also know that normally <em>if</em> someone extends our bean they should not only extend the java class but also add a <code>parent="someBean"</code> to inherit the properties).
  Is there a way in the code to mark the usage of @Resource as deprecated?</p>