Set<String> (PsiMethod constructor, Set<PsiMethod> visited) { LOG.assertTrue(constructor.isConstructor()); final GroovyResolveResult resolveResult = constructor instanceof GrMethod ? resolveChainingConstructor((GrMethod)constructor) : null; if (resolveResult == null) { return Collections.emptySet(); } final PsiSubstitutor substitutor = resolveResult.getSubstitutor(); final PsiMethod chainedConstructor = (PsiMethod)resolveResult.getElement(); assert chainedConstructor != null; if (!visited.add(chainedConstructor)) { return Collections.emptySet(); } final Set<String> result = new HashSet<>(); for (PsiClassType type : chainedConstructor.getThrowsList().getReferencedTypes()) { StringBuilder builder = new StringBuilder(); TypeWriter.writeType(builder, substitutor.substitute(type), constructor, classNameProvider); result.add(builder.toString()); } if (chainedConstructor instanceof GrMethod) { LOG.assertTrue(chainedConstructor.isConstructor()); result.addAll(collectThrowsTypes(chainedConstructor, visited)); } return result; }