PsiType (@NotNull PsiMethod superMethod) { if (superMethod instanceof GrMethod) { final GrTypeElement element = ((GrMethod)superMethod).getReturnTypeElementGroovy(); return element != null ? element.getType() : null; } return superMethod.getReturnType(); }