But I'm stuck on the Processor how to add somethin...
# announcements
d
But I'm stuck on the Processor how to add something to the existing method
i
I am not 100% sure but as I recall preprocessor should not modify existing code. Tools like mockito/autovalue generate subclass, override method do some additional operation there and call super method
d
I ended up solving it in a different way, without annotation, I created a custom function
fun myFun(function: () -> Any) { .. }
and just wrapped the method bodies inside it
So inside myFun I call function.invoke() where I want
p
Yep, that's an easy way with higher order function and inside higher order function have invoke method inside measureTimeInMillis and inline this higher order function.