PsiType (boolean rValue) { final GroovyResolveResult resolveResult = PsiImplUtil.extractUniqueResult(lrResolve(rValue)); PsiElement resolved = resolveResult.getElement(); for (GrReferenceTypeEnhancer enhancer : GrReferenceTypeEnhancer.EP_NAME.getExtensions()) { PsiType type = enhancer.getReferenceType(this, resolved); if (type != null) { return type; } } PsiType result = getNominalTypeInner(resolveResult); if (result == null) return null; result = TypesUtil.substituteAndNormalizeType(result, resolveResult.getSubstitutor(), resolveResult.getSpreadState(), this); return result; }