I realise that this might be a question that has been asked and answered, but please bear with me.
I want to know if it is possible to use annotations to inject code int
Something needs to process the annotations, so it either happens at compile time with an annotation processor or at runtime with reflection (yes I know, there are even more exotic ways of doing it at runtime).
He most definitely is using an annotation processor, it's just that it's implicit. The javac
command will search the class path for annotation processors if not explicitly set.
Since he uses this command to compile:
javac -cp ~/development/panno/build/hanhuy-panno.jar *.java
We see he has modified the class path to include the hanhuy-panno.jar
, which will contain the annotation processor.
Why not just email the guy and ask if he'll give you the code?