void (PsiMethod method) { final PsiReferenceList throwsList = method.getThrowsList(); final PsiClassType[] throwsTypes = throwsList.getReferencedTypes(); for (PsiClassType throwsType : throwsTypes) { addDependency(throwsType); } }