I'm trying to use defrecord to implement the interface org.apache.http.conn.params.ConnPerRoute.
That interface consists of exactly one method, with the following signature: int getMaxForRoute(HttpRoute route); The documentation for this interface is at http://grepcode.com/file/repo1.maven.org/maven2/org.apache.httpcomponents/httpclient/4.0.1/org/apache/http/conn/params/ConnPerRoute.java?av=f Here's a snippet from the repl illustrating the problem: user=> (first (.getMethods org.apache.http.conn.params.ConnPerRoute)) #<Method public abstract int org.apache.http.conn.params.ConnPerRoute.getMaxForRoute(org.apache.http.conn.routing.HttpRoute)> user=> (defrecord ConnPerRouteImpl [connections] org.apache.http.conn.params.ConnPerRoute (getMaxForRoute [route] connections)) java.lang.IllegalArgumentException: Can't define method not in interfaces: getMaxForRoute (NO_SOURCE_FILE:15) So... what's going on here? The repl says that the first method in org.apache.http.conn.params.ConnPerRoute is getMaxForRoute. Then the repl says defrecord cannot define the method getMaxForRoute because it's in the ConnPerRoute interface. I get the same result when I use type hints. Why?? -- Andrew -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en