private @Nullable PsiType getPsiType(String classCastExceptionType) {
    int dim = 0;
    while (classCastExceptionType.startsWith("[", dim)) {
      dim++;
    }
    String className;
    if (dim > 0) {
      if (classCastExceptionType.startsWith("L", dim) && classCastExceptionType.endsWith(";")) {
        className = classCastExceptionType.substring(dim + 1, classCastExceptionType.length() - 1);
      } else {
        if (classCastExceptionType.length() == dim + 1){
          PsiType type = PsiPrimitiveType.fromJvmTypeDescriptor(classCastExceptionType.charAt(dim));
          if (type != null) {
            while (dim-- > 0) type = type.createArrayType();
            return type;
          }
        }
        return null;
      }
    } else {
      className = classCastExceptionType;
    }
    PsiClass psiClass = ClassUtil.findPsiClass(PsiManager.getInstance(myProject), className, null, true);
    if (psiClass != null) {
      PsiType type = JavaPsiFacade.getElementFactory(myProject).createType(psiClass);
      while (dim-- > 0) type = type.createArrayType();
      return type;
    }
    return null;
  }
private @Nullable PsiType getPsiType(String classCastExceptionType)