change generated code to java8