https://kotlinlang.org logo
Title
a

Ademir Queiroga

04/05/2021, 10:12 PM
Hello everyone! I’m am trying to improve my processor and I am struggling to get the
typeParameters
from this
object
I tried a few things already but without success.
object SchemeProperty : ValueModifier<String, String>{ ... }
Tried a few things but for the SchemeProperty KSDeclaration the typeParameters is empty and if I try to get the typeParameters from the superClass I receive only the generics types.
j

Jiaxiang

04/05/2021, 10:34 PM
have you tried
KSClassDeclaration.superTypes
? You should get the type parameter from either
resolve()
or
element
of
KSTypeReference
a

Ademir Queiroga

04/05/2021, 10:42 PM
That’s it. I did not know about the KSReferenceElement but it’s exactly what I needed.
Thank you very much for the help!
👍 1