Hi,

definterface has the ability to type methods.

http://dev.clojure.org/jira/browse/CLJ-737 and its attached patch
http://dev.clojure.org/jira/secure/attachment/10119/definterface-array-fix-with-tests.patch
suggest, that you should be able specify array types too.
When I tried it (in 1.3), however, it didn't work:

> (definterface Name (^"[Ljava.lang.String;" method []))
Method "method" in class aserver/entity/device/Name has illegal
signature "()L[Ljava/lang/String;;"
  [Thrown class java.lang.ClassFormatError]

Primitive array hints do compile, the compiled code refers to a class
named by the literal string though; hinting with ^longs, .. works:
> (definterface Name (^"[J" method [^longs arg]))
// looking into the .class file with JD http://java.decompiler.free.fr/
public abstract [J getPushes(long[] arg);

Did I do something wrong?

kind regards
-- 
__________________________________________________________________
Herwig Hochleitner

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