asPsiMethods¶
context(session: KaSession)
fun KaFunctionSymbol.asPsiMethods(): List<PsiMethod>
Converts the given KaFunctionSymbol to Java PsiMethods in the context of the useSiteModule.
The resulting list is the view on the given Kotlin declaration from Java and contains all PsiMethods produced by this.
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 KaFunctionSymbol is not visible from Java, returns an empty list.
Example:¶
The following Kotlin function:
Is seen as the following PsiMethods from Java: