code: public void printJavaTypeToObject(String value, Class<?> javaType)
        throws IOException
    {
      if (Object.class.isAssignableFrom(javaType))
        print(value);
      else if (javaType.equals(boolean.class))
        print("new Boolean(" + value + ")");
      else if (javaType.equals(byte.class))
        print("new Byte(" + value + ")");
      else if (javaType.equals(short.class))
        print("new Short(" + value + ")");
      else if (javaType.equals(int.class))
        print("new Integer(" + value + ")");
      else if (javaType.equals(long.class))
        print("new Long(" + value + ")");
      else if (javaType.equals(char.class))
        print("String.valueOf(" + value + ")");
      else if (javaType.equals(float.class))
        print("new Float(" + value + ")");
      else if (javaType.equals(double.class))
        print("new Double(" + value + ")");
      else
        print(value);
    }
docs: Converts a java primitive type to a Java object.
  
  @param value
  the java expression to be converted
  @param javaType
  the type of the converted expression.