diff options
author | Rich Hickey <richhickey@gmail.com> | 2008-03-30 19:59:50 +0000 |
---|---|---|
committer | Rich Hickey <richhickey@gmail.com> | 2008-03-30 19:59:50 +0000 |
commit | 3a858f99f9804ce98f6ba57dc5d60e5c893d5298 (patch) | |
tree | f3348b094edd023b8d961bec37189e5a7efa2f90 | |
parent | c66601446550a1edac179bb1000dfa3bd5325b72 (diff) |
proxy - handle interfaces that redeclare Object methods
-rw-r--r-- | src/proxy.clj | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/proxy.clj b/src/proxy.clj index d9aceffb..c49cbdf0 100644 --- a/src/proxy.clj +++ b/src/proxy.clj @@ -175,9 +175,10 @@ ;add methods matching interfaces', if no mapping -> throw (doseq #^Class iface interfaces (doseq #^java.lang.reflect.Method meth (. iface (getMethods)) - (gen-method meth - (fn [gen m] - (. gen (throwException ex-type (. m (getName))))))))) + (when-not (contains? mm [(. meth (getName)) (seq (. meth (getParameterTypes)))]) + (gen-method meth + (fn [gen m] + (. gen (throwException ex-type (. m (getName)))))))))) ;finish class def (. cv (visitEnd)) |