Code replacement with an annotation processor

前端 未结 2 1078
后悔当初
后悔当初 2020-11-30 02:00

I\'m trying to write an annotation processor to insert methods and fields on a class... and the documentation is so sparse. I\'m not getting far and I don\'t know if I\'m ap

2条回答
  •  醉话见心
    2020-11-30 02:41

    A bit late :), but one solution could be to use Byte Buddy's transformer as part of the build process. See eg https://github.com/raphw/byte-buddy/tree/master/byte-buddy-maven-plugin.

提交回复
热议问题