Implement a printer for MethodDefinition.