Yeah. I tried that but it gives what you expect:
Class A defined as follows:
package projects.test;
public class A
{
public boolean y;
public boolean $z;
}
REPL:
user=> (import '(projects.test A))
projects.test.A
user=> (def m (A.))
#'user/m
user=> (set! (. m y) true)
true
user=> (set! (. m $z) true)
java.lang.IllegalArgumentException: No matching field found:
_DOLLARSIGN_z for class projects.test.A
(NO_SOURCE_FILE:0)
user=> (def klass (.getClass m))
#'user/klass
user=> (def fields (.getFields klass))
#'user/fields
user=> (.getName (aget fields 0))
"y"
user=> (.getName (aget fields 1))
"$z"
user=>
Just so everyone knows this isn't a trumped up example. If I can make
this work then I can instantiate JavaFX classes directly without using
JavaFX reflection. I'm exploring a Clojure cover library for JavaFX.
Incidently, some of you might be interested in this:
http://steveonjava.com/javafx-your-way-building-javafx-applications-with-alternative-languages/
Stephen Chin will presenting a talk at JavaOne about using other JVM
languages to call JavaFX.
> > names?- Hide quoted text -
>
> - Show quoted text -