ralf
04/12/2020, 11:07 PM// Original:
@MyAnnotation(values = ["a", "b"]
class MyClass
// Expected:
@MyAnnotation(values = ["a", "b", "c"]
class MyClass
I couldn’t find a hook to do this. I only found ways add a new annotation. Any pointers?shikasd
04/15/2020, 11:07 AMTransform.replace
or just do it on backend, depending on where you need those values.ralf
04/16/2020, 1:54 AMAnalysisHandlerExtension
, but I’m afraid to use that, because they rely on implementation details and this could easily break in the future. For the analysis you get access to the list of files files: Collection<KtFile>
and they cast this to an ArrayList and then replace some of files for changing the source code. That’s scary in my opinion.