Can the following class be generated using Clojure's gen-class macro?
public class Test {
public static final String TEST_NAME = "This test's name.";
}
If not, why not?
Can the following class be generated using Clojure's gen-class macro?
public class Test {
public static final String TEST_NAME = "This test's name.";
}
If not, why not?
Copyright © 2021 Jogjafile Inc.
No, gen-class can't generate static fields because gen-class is for introp. It attempts to give you the power to create the kind of classes demanded by other java libs. It is rare for a java lib to require that you provide a class with a particular static field.