Rewrite a code generator in Java!