@tschuchort It’s impossible. Java Annotation Processing standard JSR-269 doesn’t support mutation of existing code, only generation of new code. And it’s not kotlinpoet restriction, KotlinPoet tool that allow you to write Kotlin code programmatically, but APT doesn’t allow to do that (same as kapt, that uses this standard to support existing annotation processors).
The only way to add methods and so on it’s bytecode manipulation (you can check Android Gradle Trasnform API as an example of such approach -
http://tools.android.com/tech-docs/new-build-system/transform-api)
Or Kotlin Compiler Plugins. There is a few of them from Kotlin Team, but this API is not public and not stable, so not intended to use by third party developers for now.
There are some other techniques that allow you to emulate this. For example you can generate class that extends your existing class and adds method, but this approach of course has a lot of problems. You can check AndroidAnnotations library that use such technique. And on my experience it’s really bad approach that pollute your code a lot.