@Override
    public PsiType visitClassType(final @NotNull PsiClassType classType) {
      final PsiClassType.ClassResolveResult resolveResult = classType.resolveGenerics();
      final PsiClass aClass = resolveResult.getElement();
      if (aClass == null) return classType;

      PsiUtilCore.ensureValid(aClass);
      if (aClass instanceof PsiTypeParameter) {
        final PsiTypeParameter typeParameter = (PsiTypeParameter)aClass;
        final PsiType result = getFromMap(typeParameter);
        if (PsiTypes.voidType().equals(result)) {
          return classType;
        }
        if (result != null) {
          if (result instanceof PsiClassType || result instanceof PsiArrayType || result instanceof PsiWildcardType) {
            return result.annotate(getMergedProvider(classType, result));
          }
        }
        return result;
      }
      PsiSubstitutor resultSubstitutor = processClass(aClass, resolveResult.getSubstitutor());
      PsiClassType result = JavaPsiFacade.getElementFactory(aClass.getProject())
        .createType(aClass, resultSubstitutor, classType.getLanguageLevel());
      return result.annotate(classType.getAnnotationProvider());
    }
@Override
    public PsiType visitClassType(final @NotNull PsiClassType classType)