File tree 1 file changed +39
-2
lines changed
1 file changed +39
-2
lines changed Original file line number Diff line number Diff line change 87
87
(print-args o w)
88
88
(.write w " )" ))
89
89
90
- (defmethod print-method Object [o, ^Writer w]
90
+ (defn- print-object [o, ^Writer w]
91
91
(.write w " #<" )
92
92
(.write w (.getSimpleName (class o)))
93
93
(.write w " " )
94
94
(.write w (str o))
95
95
(.write w " >" ))
96
96
97
+ (defmethod print-method Object [o, ^Writer w]
98
+ (print-object o w))
99
+
97
100
(defmethod print-method clojure.lang.Keyword [o, ^Writer w]
98
101
(.write w (str o)))
99
102
214
217
(print-map m print-dup w)
215
218
(.write w " )" ))
216
219
220
+ ; ; java.util
221
+ (prefer-method print-method clojure.lang.IPersistentCollection java.util.Collection)
222
+ (prefer-method print-method clojure.lang.IPersistentCollection java.util.RandomAccess)
223
+ (prefer-method print-method java.util.RandomAccess java.util.List)
224
+ (prefer-method print-method clojure.lang.IPersistentCollection java.util.Map)
225
+
226
+ (defmethod print-method java.util.List [c, ^Writer w]
227
+ (if *print-readably*
228
+ (do
229
+ (print-meta c w)
230
+ (print-sequential " (" pr-on " " " )" c w))
231
+ (print-object c w)))
232
+
233
+ (defmethod print-method java.util.RandomAccess [v, ^Writer w]
234
+ (if *print-readably*
235
+ (do
236
+ (print-meta v w)
237
+ (print-sequential " [" pr-on " " " ]" v w))
238
+ (print-object v w)))
239
+
240
+ (defmethod print-method java.util.Map [m, ^Writer w]
241
+ (if *print-readably*
242
+ (do
243
+ (print-meta m w)
244
+ (print-map m pr-on w))
245
+ (print-object m w)))
246
+
247
+ (defmethod print-method java.util.Set [s, ^Writer w]
248
+ (if *print-readably*
249
+ (do
250
+ (print-meta s w)
251
+ (print-sequential " #{" pr-on " " " }" (seq s) w))
252
+ (print-object s w)))
253
+
217
254
; ; Records
218
255
219
256
(defmethod print-method clojure.lang.IRecord [r, ^Writer w]
241
278
(print-meta s w)
242
279
(print-sequential " #{" pr-on " " " }" (seq s) w))
243
280
244
- (def ^{:tag String
281
+ (def ^{:tag String
245
282
:doc " Returns name string for char or nil if none"
246
283
:added " 1.0" }
247
284
char-name-string
You can’t perform that action at this time.
0 commit comments