I wonder if reflection could get one around completely and correctly parsing the source again.No. Java reflection API (java.lang.reflect.* package) provides some basic info about the Java classes being executed. It has no connection with Java source nor even with binary representation of Java classes.
Or is there an open interface to the compiler anywhere?I think, there must be such libraries, including open source. For instance, a few minute search in Google gave me a couple of links: