macro expansion for methods

Closes #4621