docs: function addMethod(name, method, interf, opts) {
          var metadata,
              isStatic = opts && opts.isStatic,
              target;
  
          // Check if it is not a function
          if (!isFunction(method) || method[$interface] || method[$class]) {
              throw new Error('Member "' + name + '" found in interface "' + interf.prototype.$name + '" is not a function.');
          }
          // Check if it is public
          if (name.charAt(0) === '_') {
              throw new Error('Interface "' + interf.prototype.$name + '" contains an unallowed non public method: "' + name + '".');
          }
          // Check if it contains no implementation
          if (!isFunctionEmpty(method)) {
              throw new Error((isStatic ? 'Static method' : 'Method') + ' "' + name + '" must be anonymous and contain no implementation in interface "' + interf.prototype.$name + '".');
          }
          // Check if function is ok
          metadata = functionMeta(method, name);
          if (metadata === null) {
              throw new Error((isStatic ? 'Static method' : 'Method') + ' "' + name + '" contains optional arguments before mandatory ones in interface "' + interf.prototype.$name + '".');
          }
  
          target = isStatic ? interf[$interface].staticMethods : interf[$interface].methods;
  
          // Check if the method already exists and it's compatible
          if (isObject(target[name])) {
              if (!isFunctionCompatible(metadata, target[name])) {
                  throw new Error((isStatic ? 'Static method' : 'Method') + ' "' + name + '(' + metadata.signature + ')" defined in interface "' + interf.prototype.$name + '" overrides its ancestor but it is not compatible with its signature: "' + name + '(' + target[name].signature + ')".');
              }
          }
  
          target[name] = metadata;
      }