class code generation