Declare Member Variables with gen-class in Clojure -
I'm learning how to expand Java classes in Clojure, but I showed no way to declare a new member variable Does not; I only see a way for the methods.
(ns test.aclass (: gen-class: methods [[foo [] string]]))
Does anyone : members
Is there another way to declare a keyword or member variable?
If supplied, then a public with the given name The last example field will be created. To provide value to the state, you must supply a: init function. Note that, although the last, the state can be a referee or agent, which supports the creation of Java objects with transactions or asynchronous mutation words.
An example of how it can be used.
P>
Comments
Post a Comment