Reputation: 83
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?
Upvotes: 2
Views: 416
Reputation: 5208
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.
Upvotes: 1