code: static String constantValueExpression(Object cb) {
          if (cb == null) return null;
          if (cb instanceof Character) return sourceForm(((Character)cb).charValue());
          if (cb instanceof Byte) return sourceForm(((Byte)cb).byteValue());
          if (cb instanceof String) return sourceForm((String)cb);
          if (cb instanceof Double) return sourceForm(((Double)cb).doubleValue(), 'd');
          if (cb instanceof Float) return sourceForm(((Float)cb).doubleValue(), 'f');
          if (cb instanceof Long) return cb + "L";
          return cb.toString(); // covers int, short
      }
docs: A static version of the above.