I need to generate something like this with jcodemodel
package com.example;
public class Main {
static int a;
static {
a = 5;
}
public static void main (String[] args) {
}
}
Google did not help. There is a class JBlock
but there is nothing about initialization blocks.
need to call JDefinedClass.init() which returns JBlock