Add method call function.

This is only for FFI, user don't need to use it.