Hi, Am Montag, 20. Januar 2014 11:34:29 UTC+1 schrieb Fabian Page: > > > I get a: > java.lang.IllegalArgumentException: Can't call public method of non-public > class: public final void > com.sun.media.sound.AbstractDataLine.open(javax.sound.sampled.AudioFormat,int) > > throws javax.sound.sampled.LineUnavailableException > > From a tutorial i saw that they first typecast the AbstractDataLine to a > SouceDataLine. I wanted to make this typecast. > > Ok. What you need is a type hint in the interop call, so that the compiler can emit a call to the right interface.
(.open #^SourceDataLine abstract-data-line-thingy 1) If you had to do the several calls with that interface, you could the type hint at a more central spot. (let [abstract-data-line-thingy #^SourceDataLine (obtain-thingy)] (doto abstract-data-line-thingy (.open 1) (.otherMethod 2))) Hope that helps. Meikel -- -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.