toMethodDefinition() {
    return {
      type: 'MethodDefinition',
      key: {
        type: 'Identifier',
        name: this.name,
      },
      computed: false,
      value: {
        type: 'FunctionExpression',
        async: this.methodNode.async,
        params: this.methodNode.params,
        defaults: this.methodNode.defaults,
        body: this.getBody(),
        generator: false,
        expression: false,
      },
      kind: this.kind,
      static: this.static,
      comments: extractComments(this.commentNodes),
    };
  }
Transforms the potential method to actual MethodDefinition node.
@return {MethodDefinition}