PsiType (@NotNull PsiElement element) { if (element instanceof PsiVariable) { return ((PsiVariable)element).getType(); } if (element instanceof PsiMethod) return ((PsiMethod)element).getReturnType(); return null; }