void (@NotNull PsiMethodCallExpression expression) { super.visitMethodCallExpression(expression); final PsiReferenceExpression methodExpression = expression.getMethodExpression(); final PsiExpression qualifierExpression = methodExpression.getQualifierExpression(); if (qualifierExpression != null && !myClass.isEquivalentTo(PsiUtil.resolveClassInType(qualifierExpression.getType()))) return; final PsiElement resolved = methodExpression.resolve(); if (resolved instanceof PsiMethod method && "getClass".equals(method.getName()) && method.getParameterList().isEmpty()) { result.putValue(methodExpression, JavaRefactoringBundle.message("inline.to.anonymous.no.get.class.calls")); } }