Thanks! That did the trick.

 

From: clojure@googlegroups.com [mailto:cloj...@googlegroups.com] On Behalf
Of J. McConnell
Sent: Thursday, September 10, 2009 12:40 PM
To: clojure@googlegroups.com
Subject: Re: Class function alwayrs returns java.lang.class??

 

On Thu, Sep 10, 2009 at 1:20 PM, Seth Burleigh <s...@tewebs.com> wrote:

Ah. So class returns the class of the instance, and does not find the class
with the name given.

Yes.

So , if I wanted to get the class of a ExecutionEvent, I would

Have to go (Class/forName "org.eclipse.core.commands.ExecutionEvent")? 

Nope, you would just have to type "ExecutionEvent", without quotes. Symbols
that are class names are evaluated directly as instances of Class for the
class they name.

user=> (import 'java.util.HashMap)
java.util.HashMap
user=> (= HashMap (Class/forName "java.util.HashMap"))
true

Hope that helps,

- J.




--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to