void (@NotNull ReflectiveClass ownerClass, @NotNull PsiExpression constructorTypeExpression, @NotNull ProblemsHolder holder) { if (!ownerClass.isExact()) return; final ReflectiveSignature constructorSignature = composeMethodSignature(constructorTypeExpression); if (constructorSignature != null) { final List<PsiMethod> constructors = ContainerUtil.filter(ownerClass.getPsiClass().getMethods(), PsiMethod::isConstructor); List<ReflectiveSignature> validSignatures = null; if (constructors.isEmpty()) { if (!constructorSignature.equals(ReflectiveSignature.NO_ARGUMENT_CONSTRUCTOR_SIGNATURE)) { validSignatures = Collections.singletonList(ReflectiveSignature.NO_ARGUMENT_CONSTRUCTOR_SIGNATURE); } } else if (findMethodBySignature(constructors, constructorSignature).isEmpty()) { validSignatures = constructors.stream() .map(JavaReflectionReferenceUtil::getMethodSignature) .filter(Objects::nonNull) .collect(Collectors.toList()); } if (validSignatures != null) { final String declarationText = getConstructorDeclarationText(ownerClass, constructorSignature); if (declarationText != null) { LocalQuickFix fix = null; final String ownerClassName = ownerClass.getPsiClass().getName(); if (ownerClassName != null) { fix = ReplaceSignatureQuickFix .createFix(constructorTypeExpression, ownerClassName, validSignatures, true, holder.isOnTheFly()); } holder.registerProblem(constructorTypeExpression, JavaErrorBundle.message("cannot.resolve.constructor", declarationText), LocalQuickFix.notNullElements(fix)); } } } }