PsiType () { PsiType result = PsiJavaParserFacadeImpl.getPrimitiveType(myTypeText); if (result != null) return result; ClsElementImpl childElement = myChild.getValue(); if (childElement instanceof ClsTypeElementImpl) { if (isArray()) { switch (myVariance) { case VARIANCE_NONE: return createArrayType((PsiTypeElement)childElement); case VARIANCE_EXTENDS: return PsiWildcardType.createExtends(getManager(), ((PsiTypeElement)childElement).getType()); case VARIANCE_SUPER: return PsiWildcardType.createSuper(getManager(), ((PsiTypeElement)childElement).getType()); default: assert false : myVariance; return null; } } else { assert isVarArgs() : this; return createArrayType((PsiTypeElement)childElement); } } if (childElement instanceof ClsJavaCodeReferenceElementImpl) { PsiClassReferenceType psiClassReferenceType = new PsiClassReferenceType((PsiJavaCodeReferenceElement)childElement, null); switch (myVariance) { case VARIANCE_NONE: return psiClassReferenceType; case VARIANCE_EXTENDS: return PsiWildcardType.createExtends(getManager(), psiClassReferenceType.annotate(myAnnotations.forBound().getProvider(childElement))); case VARIANCE_SUPER: return PsiWildcardType.createSuper(getManager(), psiClassReferenceType.annotate(myAnnotations.forBound().getProvider(childElement))); case VARIANCE_INVARIANT: return PsiWildcardType.createUnbounded(getManager()); default: assert false : myVariance; return null; } } assert childElement == null : this; return PsiWildcardType.createUnbounded(getManager()); }