Compute a constant for annotation parameter in intellij plugin inspection

22 Views Asked by At

How I can compute a constant value passed as argument of annotation, I have access to the KtNamedFunction.

@StreamListener(MyConst.INPUT) fun consume(message:Message<String>) { // .. }

interface MyConst { companion object { const val INPUT = “my-input” } }

I want to programatically evaluate MyConst.INPUT as “my-input”

Thanks in advance.

I'm able to get the String "MyConst.INPUT" from annotation entries but don't know how to evaluate it.

0

There are 0 best solutions below