use of org.jetbrains.kotlin.load.java.structure.impl.JavaClassImpl 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