Hello,
Does anyone know a straightforward way to create a constructor using
gen-class that takes an argument of the same class as the class you're
generating?
When I try to do it I get a ClassNotFoundException, assuming I don't
have a previous compiled version of the class in my compile path.
Basically what I'm trying to do is:
(ns my.class
(:gen-class
:init init
:constructors {[String String] []
[some.java.Class] []
[my.class] []}
:state state)
(:import [stuff.goes.here]))
(implementation)
I could just instruct the constructor to take an Object, but that's
not satisfying and forces me to branch more in -init to determine the
class of the argument.
On a different note, is there a capitalization convention for classes
created with gen-class? Is it CamelCase since they're java classes for
all intents and purposes? Or hyphen-case since we want to spread the
love?
Thanks,
Garth
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---