Code generation for Java