boolean (@NotNull UCallExpression expression) { if (expression.getKind() == UastCallKind.CONSTRUCTOR_CALL) { final PsiClass psiClass = PsiTypesUtil.getPsiClass(expression.getReturnType()); if (psiClass != null) { final String name = psiClass.getQualifiedName(); String replacement = name==null?null:CLASSES.get(name); if (replacement != null) { descriptors.add( manager.createProblemDescriptor(Objects.requireNonNull(expression.getSourcePsi()), DevKitBundle.message("inspections.undesirable.class.use.instead", replacement), true, ProblemHighlightType.LIKE_DEPRECATED, isOnTheFly)); } } } return true; }