javac.exe AST programmatic access example
Is it possible to access the Abstract Syntax Tree(AST) inside the javac.exe programmatically? Could you provide an example? jamesh Yes, it is possible, but only since Java 6. Peter von der Ahé talks about the two JSRs in this interview . Of JSR 199: The JSR 199 Compiler API consists of three things: The first one basically allows you to invoke a compiler via the API. Second, the API allows you to customize how the compiler finds and writes out files. I mean files in the abstract sense, since the files the compiler deals with aren't necessarily on the file system. JSR 199's file abstraction