PsiReferenceList (PsiClassType @NotNull [] exceptionTypes) { if (exceptionTypes.length == 0) { return createMethodFromText("def foo(){}", null).getThrowsList(); } String[] types = new String[exceptionTypes.length]; for (int i = 0; i < types.length; i++) { types[i] = exceptionTypes[i].getCanonicalText(); } final String end = StringUtil.join(types, ","); return createMethodFromText("def foo() throws " + end + "{}", null).getThrowsList(); }