add code generate for method invoke