Generate method implement code in m file.