I\'m experimenting with java annotation processors. I\'m able to write integration tests using the \"JavaCompiler\" (in fact I\'m using \"hickory\" at the moment). I can run the
I was in a similar situation, so I created the Avatar library. It won't give you the performance of a pure unit test with no compilation, but if used correctly you shouldn't see much of a performance hit.
Avatar lets you write a source file, annotate it, and convert it to elements in a unit test. This allows you to unit test methods and classes which consume Element objects, without manually invoking javac.