org.jetbrains.kotlin.analysis.api.javaInterop¶
Types¶
KaElementJavaView¶
@SubclassOptInRequired(markerClass = [KaImplementationDetail::class])
interface KaElementJavaView
A view on Kotlin KtElements from Java perspective.
KaSymbolJavaView¶
@SubclassOptInRequired(markerClass = [KaImplementationDetail::class])
interface KaSymbolJavaView<out T : KaSymbol> : KaElementJavaView
A view on Kotlin KaSymbols from Java perspective.
Properties¶
callableSymbol¶
context(session: KaSession)
val PsiMember.callableSymbol: KaCallableSymbol?
A KaCallableSymbol for the given PsiMember method or field, or null for local declarations and Kotlin light classes.
containingJvmClassName¶
context(session: KaSession)
val KaCallableSymbol.containingJvmClassName: String?
The containing JVM class name for the given KaCallableSymbol.
isPrimitiveBacked¶
context(session: KaSession)
val KaType.isPrimitiveBacked: Boolean
Whether the given KaType is backed by a single JVM primitive type.
javaMethodName¶
context(session: KaSession)
val KaFunctionSymbol.javaMethodName: String?
The visible Java method name for the given KaFunctionSymbol. The behavior is unspecified for modules other than the JVM.
namedClassSymbol¶
context(session: KaSession)
val PsiClass.namedClassSymbol: KaNamedClassSymbol?
A KaNamedClassSymbol for the given PsiClass, or null for anonymous classes, local classes, type parameters (which are also PsiClasses), and Kotlin light classes.
Functions¶
asFacadePsiClass¶
context(session: KaSession)
fun KaFileSymbol.asFacadePsiClass(): PsiClass?
Converts the given KaFileSymbol to Java facade PsiClass in the context of the useSiteModule.
context(session: KaSession)
fun KaScriptSymbol.asFacadePsiClass(): PsiClass?
Converts the given KaScriptSymbol to Java facade PsiClass in the context of the useSiteModule.
asKaType¶
Converts the given PsiType to a KaType in the context of the useSitePosition.
asPsiClass¶
context(session: KaSession)
fun KaClassSymbol.asPsiClass(): PsiClass?
Converts the given KaClassSymbol to Java PsiClass in the context of the useSiteModule.
asPsiField¶
context(session: KaSession)
fun KaBackingFieldSymbol.asPsiField(): PsiField?
Converts the given KaBackingFieldSymbol to Java PsiField in the context of the useSiteModule.
context(session: KaSession)
fun KaClassSymbol.asPsiField(): PsiField?
Converts the given KaClassSymbol to Java PsiField in the context of the useSiteModule.
context(session: KaSession)
fun KaEnumEntrySymbol.asPsiField(): PsiEnumConstant?
Converts the given KaEnumEntrySymbol to Java PsiEnumConstant in the context of the useSiteModule.
asPsiMethods¶
context(session: KaSession)
fun KaFunctionSymbol.asPsiMethods(): List<PsiMethod>
Converts the given KaFunctionSymbol to Java PsiMethods in the context of the useSiteModule.
asPsiParameters¶
context(session: KaSession)
fun KaParameterSymbol.asPsiParameters(): List<PsiParameter>
Converts the given KaParameterSymbol to Java PsiParameters in the context of the useSiteModule.
asPsiTypeParameters¶
context(session: KaSession)
fun KaTypeParameterSymbol.asPsiTypeParameters(): List<PsiTypeParameter>
Converts the given KaTypeParameterSymbol to Java PsiTypeParameters in the context of the useSiteModule.
mapToJvmTypeDescriptor¶
context(session: KaSession)
fun KaType.mapToJvmTypeDescriptor(): String
Convert the given KaType to a JVM type descriptor with the KaTypeMappingMode.DEFAULT. To learn more about JVM descriptors, check out the JVM specification.