use of org.jetbrains.kotlin.asJava.KtLightClassMarker in project kotlin by JetBrains.
the class JavaClassFinderImpl method findClass.
@Nullable
@Override
public JavaClass findClass(@NotNull ClassId classId) {
PsiClass psiClass = javaFacade.findClass(classId, javaSearchScope);
if (psiClass == null)
return null;
JavaClassImpl javaClass = new JavaClassImpl(psiClass);
FqName fqName = classId.asSingleFqName();
if (!fqName.equals(javaClass.getFqName())) {
throw new IllegalStateException("Requested " + fqName + ", got " + javaClass.getFqName());
}
if (psiClass instanceof KtLightClassMarker) {
throw new IllegalStateException("Kotlin light classes should not be found by JavaPsiFacade, resolving: " + fqName);
}
return javaClass;
}
Aggregations