store/[org.clojure/clojure "1.8.0"] clj::clojure.core/update-proxy

Official Documentation

Add notes
Arities
==================================================
   [proxy mappings]

Docstring
==================================================
  Takes a proxy instance and a map of strings (which must
  correspond to methods of the proxy superclass/superinterfaces) to
  fns (which must take arguments matching the corresponding method,
  plus an additional (explicit) first arg corresponding to this, and
  updates (via assoc) the proxy's fn map. nil can be passed instead of
  a fn, in which case the corresponding method will revert to the
  default behavior. Note that this function can be used to update the
  behavior of an existing instance without changing its identity.
  Returns the proxy.

Source

(defn update-proxy
  "Takes a proxy instance and a map of strings (which must
  correspond to methods of the proxy superclass/superinterfaces) to
  fns (which must take arguments matching the corresponding method,
  plus an additional (explicit) first arg corresponding to this, and
  updates (via assoc) the proxy's fn map. nil can be passed instead of
  a fn, in which case the corresponding method will revert to the
  default behavior. Note that this function can be used to update the
  behavior of an existing instance without changing its identity.
  Returns the proxy."
  {:added "1.0"}
  [^IProxy proxy mappings]
    (. proxy (__updateClojureFnMappings mappings))
    proxy)

Example 1

Edit
;; from http://groups.google.com/group/clojure/msg/71702435ccd1d189
(import java.util.Date)
;; => java.util.Date

(def d (proxy [Date] [] (toString [] "hello")))
;; => #'user/d

d
;; => #<Date$0 hello>

(.toString d)
;; => "hello"

(.toGMTString d)
;; => "17 Nov 2010 12:57:28 GMT"

(update-proxy d {"toGMTString" (fn [this] "goodbye")})
;; => nil

(.toGMTString d)
;; => "goodbye" 

Uses on crossclj