jgpc42 / insn

Functional JVM bytecode generation for Clojure.
Eclipse Public License 1.0
198 stars 5 forks source link

static initializer section #8

Closed cnuernber closed 3 years ago

cnuernber commented 3 years ago

I may have missed it but how would you recommend I code up a static initialization section?

jgpc42 commented 3 years ago

From the docs:

Class/interface methods, constructors, and static initializers are
provided as maps.

:name   method name (required). Can be either :init or :clinit,
        designating a constructor or the static initializer,
        respectively.
...

Here's a test demonstrating :clinit.

Please see the documentation, wiki, and/or the tests for usage information and examples. Thanks.

cnuernber commented 3 years ago

Perfect, thanks!