I am creating exercises in how to write a plug-in for a system integration tool. We will have the correct answers, which will be implemented for demonstration after the exercises, but the students will get a source where some methods are empty and they have a comment with TODO in them describing what they should do.
To avoid duplication, it would be nice if student versions could be generated from compiled and correct source answer files. It seemed to me that the Java annotation processing tool (APT, not debian APT) could be used to generate exercises so that APT would spit out methods as empty if the input method contains an annotation for this.
Can this be done using APT? If so, how to do it?
Are there any better / simpler ways to avoid duplication, generate exercises, and correct answers from a single source that I skip?
source share