What is the correct way to get the generics as PsiType of a PsiType?

Hi! There is a PsiType,  which I want to get its generics type as PsiType:

java.util.Map<java.lang.String, java.util.List<java.lang.Long>>

But I have no idea how can I get the generic type as PsiType.

I have tried to obtain KotlinType's generics. Is there a similar method for PsiType? Thank you!

// the way to obtain the KotlinType's generics
kotlinType.typeArguments.forEach { typeProjection ->
val genericKotlinType = typeProjection.type
}

 

0

Please sign in to leave a comment.