How can an AnnotationProcessor generate boilerplate in Java existing source
I’ve written Annotations, and even used them to generate additional source classes from an annotated original class.
What I have not found is a simple explanation of how to “invisibly insert” boilerplate code into an existing class, and have the results be compiled as if the source had been there all along.
For example, there is discussion of annotations that allow you to put a “@getter” annotation on a class’s field, and when the class is compiled, you can call a that getter method, generated from the field’s name. Yet there is no additional class source file.
How do they do that?