Created
November 4, 2019 08:21
-
-
Save alistairsykes/d8985e424ecf6c5732b73f98675ddbb0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.jetbrains.kotlin.KtNodeTypes | |
import org.jetbrains.kotlin.com.intellij.lang.ASTNode | |
import org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.TreeUtil | |
import org.jetbrains.kotlin.psi.KtClass | |
internal object Utils { | |
internal fun getOuterClass(node: ASTNode?): KtClass? { | |
return TreeUtil.findParent(node, KtNodeTypes.CLASS)?.psi as? KtClass | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment