asPsiParameters¶
context(session: KaSession)
fun KaParameterSymbol.asPsiParameters(): List<PsiParameter>
Converts the given KaParameterSymbol to Java PsiParameters in the context of the useSiteModule.
The resulting list is the view on the given Kotlin parameter from Java and contains all PsiParameters produced by this. Multiple parameters might be produced when the enclosing Kotlin declaration is mapped to multiple Java PSI declarations.
useSiteModule for the current KaSession is used to provide proper actualizations for expect declarations. Since the produced list is a JVM-specific representation, useSiteModule is expected to be a JVM one.
If useSiteModule is not a JVM module or the provided KaParameterSymbol is not visible from Java, returns an empty list.
Example:¶
The following Kotlin parameter a:
Is seen as the following PsiParameters from Java: