PsiMethod (@NotNull PsiMethod constructor) { Set<PsiMethod> visited = null; while (true) { PsiMethodCallExpression constructorCall = JavaPsiConstructorUtil.findThisOrSuperCallInConstructor(constructor); if (constructorCall == null || JavaPsiConstructorUtil.isSuperConstructorCall(constructorCall)) return constructor; PsiMethod target = constructorCall.resolveMethod(); if (target == null) return constructor; if (visited == null) { visited = new HashSet<>(); } if (!visited.add(target)) { return constructor; } constructor = target; } }