Clojure doesn't make you say "class" to talk about a class:
String
=> class java.lang.String
Saying "class" takes the class of a thing, even when that thing is a
class:
(class String)
=> java.lang.Class
Stu
How do I invoke Foo.class in Clojure?
Specifically, I'm trying to convert this (working) Java to Clojure.
service.getEntry(new URL(entryUrl), PortfolioEntry.class);
When I do this:
(def entry-url-str (str base-url portfolio-feed-url-suffix "/" id)) ;
this works
(def entry-url (new URL entry-url-str)) ; this works too
(doto service
...
(. getEnrty entry-url (class PortfolioEntry)))
I get this:
actual: java.lang.IllegalArgumentException: No matching method found:
getEnrty for class com.google.gdata.client.finance.FinanceService
Is seems like "(class PortfolioEntry)" doesn't resolve to the same
type as "PortfolioEntry.class".
Any ideas?
--
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
To unsubscribe, reply using "remove me" as the subject.
--
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