title: Creating Java compiler plugin for Java 7
body: <p>I'm writing a Java compiler plugin using the -XPlugin argument of javac. This argument is documented in Java 9. It's not documented in Java 8 (according to <a href="https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javac.html" rel="nofollow noreferrer">https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javac.html</a> ), but curiously -XPlugin still works on Java 8.</p>
  
  <p>Is it possible to adopt a plugin for Java 7? The -XPlugin argument isn't supported but I'm wondering if it is still possible to get the same behavior from the compiler, namely: callbacks from the compiler during parsing. Maybe this can be done using an annotation processor?</p>
  
  <p>My plugin does not change the AST, it just collects information about it for static analysis.</p>