title: DebuggerStepThrough equivalent for Java
body: <p>.NET has a couple of handy annotations that instruct a debugger to step through/over certain methods. I would like to know if there is an equivalent that works on the Java platform.</p>
  
  <p>For instance:</p>
  
  <pre><code>@DebuggerStepThrough
  public void foo() {
    ..
  }
  </code></pre>
  
  <p>would cause the debugger to <strong>not</strong> stop in <code>foo</code> when stepping.</p>
  
  <h3>What I tried</h3>
  
  <ul>
  <li>using the SYNTHETIC flag in the classfile. This causes javac to forbid user-code calling such methods.</li>
  <li>custom attributes. There is no <a href="http://docs.oracle.com/javase/6/docs/jdk/api/jpda/jdi/" rel="nofollow">JDI API</a> to retrieve annotations. Also mentioned on <a href="https://forums.oracle.com/forums/thread.jspa?messageID=6369885" rel="nofollow">this forum</a>.</li>
  </ul>
  
  <p>PS. I am implementing a debugger and have control over the bytecode that is emitted</p>