private static @NonNls String getBoxedWrapper(PsiType from,
                                                PsiClassType to,
                                                @NotNull @NonNls String arg,
                                                TypeMigrationLabeler labeler,
                                                PsiElement context,
                                                @Nullable String tryType) {
    if (from instanceof PsiPrimitiveType) {
      final PsiClassType.ClassResolveResult resolveResult = PsiUtil.resolveGenericsClassInType(to);
      final PsiClass threadLocalClass = resolveResult.getElement();
      LOG.assertTrue(threadLocalClass != null);
      final PsiTypeParameter[] typeParameters = threadLocalClass.getTypeParameters();
      if (typeParameters.length == 1) {
        final PsiType initial = resolveResult.getSubstitutor().substitute(typeParameters[0]);
        final PsiPrimitiveType unboxedInitialType = PsiPrimitiveType.getUnboxedType(initial);
        if (unboxedInitialType != null) {
          if (tryType != null) {
            final PsiType exprType = labeler.getTypeEvaluator().evaluateType(
              JavaPsiFacade.getElementFactory(threadLocalClass.getProject()).createExpressionFromText(tryType, context));
            if (exprType != null && unboxedInitialType.isAssignableFrom(exprType)) {
              return coerceType(arg, from, to, context);
            }
          }
          return PsiUtil.isLanguageLevel5OrHigher(context)
                 ? "(" + unboxedInitialType.getCanonicalText() + ")(" + arg + ")"
                 : "new " + initial.getCanonicalText() + "((" + unboxedInitialType.getCanonicalText() + ")(" + arg + "))";
        }
      }
    }
    return coerceType(arg, from, to, context);
  }
private static @NonNls String getBoxedWrapper(PsiType from,
                                                PsiClassType to,
                                                @NotNull @NonNls String arg,
                                                TypeMigrationLabeler labeler,
                                                PsiElement context,
                                                @Nullable String tryType)