https://kotlinlang.org logo
#kapt
Title
# kapt
a

agrosner

09/13/2018, 3:02 PM
You use JavaPoet or something of that nature?
h

holgerbrandl

09/14/2018, 6:19 AM
I don’t use anything yet , but if it would allow to share javadoc between methods via some annotation processor, I certainly would.
It’s actually also kind of dokka feature which is still missing imho.
a

agrosner

09/14/2018, 7:44 PM
well javapoet and (I think) KotlinPoet both allow you to add code comments with references to other classes and handle imports on generated code
h

holgerbrandl

09/16/2018, 8:40 PM
But don’t both libaries create new source code from scratch? I have an existing codebase, and like to share javadoc between methods.
a

agrosner

09/16/2018, 8:46 PM
Oh misunderstood. Haha my bad
Then no you can't add to existing
Unless you use bytecode transformers but that is not easy and not worth the time
b

bdawg.io

09/17/2018, 2:44 AM
Annotation processing can only generate new code. So you would need the documentation engine to understand what to do with the shared doc when it comes across it from the annotation generation
h

holgerbrandl

09/18/2018, 9:20 AM
Thanks for the info.
5 Views