|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jetbrains.jet.asJava.LightClassGenerationSupport
org.jetbrains.jet.cli.jvm.compiler.CliLightClassGenerationSupport
public class CliLightClassGenerationSupport
This class solves the problem of interdependency between analyzing Kotlin code and generating JetLightClasses Consider the following example: KClass.kt refers to JClass.java and vice versa To analyze KClass.kt we need to load descriptors from JClass.java, and to do that we need a JetLightClass instance for KClass, which can only be constructed when the structure of KClass is known. To mitigate this, CliLightClassGenerationSupport hold a trace that is shared between the analyzer and JetLightClasses
| Nested Class Summary | |
|---|---|
static class |
CliLightClassGenerationSupport.BindingTraceContextWithoutScopeRecording
|
| Nested classes/interfaces inherited from class org.jetbrains.jet.asJava.LightClassGenerationSupport |
|---|
LightClassGenerationSupport.KotlinLightPackageClassInfo |
| Constructor Summary | |
|---|---|
CliLightClassGenerationSupport()
|
|
| Method Summary | |
|---|---|
java.util.Collection<JetClassOrObject> |
findClassOrObjectDeclarations(FqName fqName,
com.intellij.psi.search.GlobalSearchScope searchScope)
|
java.util.Collection<JetClassOrObject> |
findClassOrObjectDeclarationsInPackage(FqName packageFqName,
com.intellij.psi.search.GlobalSearchScope searchScope)
|
java.util.Collection<JetFile> |
findFilesForPackage(FqName fqName,
com.intellij.psi.search.GlobalSearchScope searchScope)
|
java.util.List<LightClassGenerationSupport.KotlinLightPackageClassInfo> |
findPackageClassesInfos(FqName fqName,
com.intellij.psi.search.GlobalSearchScope wholeScope)
|
LightClassConstructionContext |
getContextForClassOrObject(JetClassOrObject classOrObject)
|
LightClassConstructionContext |
getContextForPackage(java.util.Collection<JetFile> files)
|
static CliLightClassGenerationSupport |
getInstanceForCli(com.intellij.openapi.project.Project project)
|
ModuleDescriptorImpl |
getLightClassModule()
|
com.intellij.psi.PsiClass |
getPsiClass(JetClassOrObject classOrObject)
|
java.util.Collection<FqName> |
getSubPackages(FqName fqn,
com.intellij.psi.search.GlobalSearchScope scope)
|
BindingTrace |
getTrace()
|
void |
newBindingTrace()
|
ModuleDescriptorImpl |
newModule()
|
boolean |
packageExists(FqName fqName,
com.intellij.psi.search.GlobalSearchScope scope)
|
void |
setModule(ModuleDescriptorImpl module)
|
| Methods inherited from class org.jetbrains.jet.asJava.LightClassGenerationSupport |
|---|
getInstance |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CliLightClassGenerationSupport()
| Method Detail |
|---|
public static CliLightClassGenerationSupport getInstanceForCli(@NotNull
com.intellij.openapi.project.Project project)
@NotNull public BindingTrace getTrace()
@NotNull public ModuleDescriptorImpl newModule()
@TestOnly @Nullable public ModuleDescriptorImpl getLightClassModule()
@TestOnly
public void setModule(@NotNull
ModuleDescriptorImpl module)
@TestOnly public void newBindingTrace()
@NotNull
public LightClassConstructionContext getContextForPackage(@NotNull
java.util.Collection<JetFile> files)
getContextForPackage in class LightClassGenerationSupport
@NotNull
public LightClassConstructionContext getContextForClassOrObject(@NotNull
JetClassOrObject classOrObject)
getContextForClassOrObject in class LightClassGenerationSupport
@NotNull
public java.util.Collection<JetClassOrObject> findClassOrObjectDeclarations(@NotNull
FqName fqName,
@NotNull
com.intellij.psi.search.GlobalSearchScope searchScope)
findClassOrObjectDeclarations in class LightClassGenerationSupport
@NotNull
public java.util.Collection<JetFile> findFilesForPackage(@NotNull
FqName fqName,
@NotNull
com.intellij.psi.search.GlobalSearchScope searchScope)
findFilesForPackage in class LightClassGenerationSupport
@NotNull
public java.util.Collection<JetClassOrObject> findClassOrObjectDeclarationsInPackage(@NotNull
FqName packageFqName,
@NotNull
com.intellij.psi.search.GlobalSearchScope searchScope)
findClassOrObjectDeclarationsInPackage in class LightClassGenerationSupport
@NotNull
public java.util.List<LightClassGenerationSupport.KotlinLightPackageClassInfo> findPackageClassesInfos(@NotNull
FqName fqName,
@NotNull
com.intellij.psi.search.GlobalSearchScope wholeScope)
findPackageClassesInfos in class LightClassGenerationSupport
public boolean packageExists(@NotNull
FqName fqName,
@NotNull
com.intellij.psi.search.GlobalSearchScope scope)
packageExists in class LightClassGenerationSupport
@NotNull
public java.util.Collection<FqName> getSubPackages(@NotNull
FqName fqn,
@NotNull
com.intellij.psi.search.GlobalSearchScope scope)
getSubPackages in class LightClassGenerationSupport
@Nullable
public com.intellij.psi.PsiClass getPsiClass(@NotNull
JetClassOrObject classOrObject)
getPsiClass in class LightClassGenerationSupport
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||