Definition builder for methods.

Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>