only stub default constructor when compiling against .java source files

This commit is contained in:
Kevin Bierhoff
2020-03-09 11:33:20 -07:00
committed by Alexander Udalov
parent c83860187c
commit 7448761dfd
19 changed files with 90 additions and 2 deletions
@@ -100,6 +100,8 @@ class JavaClassImpl(psiClass: PsiClass) : JavaClassifierImpl<PsiClass>(psiClass)
return constructors(psi.constructors.filter { method -> method.isConstructor })
}
override fun hasDefaultConstructor() = !isInterface && constructors.isEmpty()
override val isAbstract: Boolean
get() = JavaElementUtil.isAbstract(this)
@@ -47,6 +47,7 @@ class BinaryJavaClass(
override val methods = arrayListOf<JavaMethod>()
override val fields = arrayListOf<JavaField>()
override val constructors = arrayListOf<JavaConstructor>()
override fun hasDefaultConstructor() = false // never: all constructors explicit in bytecode
override val annotationsByFqName by buildLazyValueForMap()