Introduce @FrontendInternals annotation

#KT-39643
This commit is contained in:
Pavel Kirpichenkov
2020-07-27 15:06:01 +03:00
parent eff5839369
commit ffc3d8bdfc
51 changed files with 172 additions and 11 deletions
@@ -15,6 +15,7 @@ import org.jetbrains.kotlin.container.ComponentProvider
import org.jetbrains.kotlin.container.getService
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
import org.jetbrains.kotlin.idea.FrontendInternals
import org.jetbrains.kotlin.idea.resolve.ResolutionFacade
import org.jetbrains.kotlin.psi.KtDeclaration
import org.jetbrains.kotlin.psi.KtElement
@@ -38,6 +39,7 @@ class KotlinResolutionFacadeForRepl(
override val moduleDescriptor: ModuleDescriptor = provider.getService(ModuleDescriptor::class.java)
@FrontendInternals
override fun <T : Any> getFrontendService(serviceClass: Class<T>): T {
return provider.resolve(serviceClass)!!.getValue() as T
}
@@ -46,6 +48,7 @@ class KotlinResolutionFacadeForRepl(
throw UnsupportedOperationException()
}
@FrontendInternals
override fun <T : Any> tryGetFrontendService(element: PsiElement, serviceClass: Class<T>): T? {
throw UnsupportedOperationException()
}
@@ -54,10 +57,12 @@ class KotlinResolutionFacadeForRepl(
throw UnsupportedOperationException()
}
@FrontendInternals
override fun <T : Any> getFrontendService(element: PsiElement, serviceClass: Class<T>): T {
throw UnsupportedOperationException()
}
@FrontendInternals
override fun <T : Any> getFrontendService(moduleDescriptor: ModuleDescriptor, serviceClass: Class<T>): T {
throw UnsupportedOperationException()
}