Hi.
I have a java interface.
Something like this this.
public interface ITest {
void printHello();
void printName(String name);
}
And i get an implementation using reify.
(def impl (reify macrotest.ITest
(^void printHello [this]
(println "Hello world!"))
(^void printName [this ^
o]
> (println "cons()"
>
> (.toString x)
> (.first x)
> (.next x)
> (.more x)
> (.cons x nil)
>
> Which outputs:
>
> validating
> toString()
> validating
> first()
> validating
> next()
> validating
> more()
> v
Thanks, that implementation is just what i was searching for.
--
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
f