code: function (serviceName, methodName, type, plugins) {
  
              var fullName = serviceName + "." + methodName,
                  newPlugins = [];
  
              if (plugins && plugins.length > 0) {
                  plugins.forEach(function (plugin) {
                      var match = this.match(fullName, plugin);
                      logger.debug("match for " + plugin.name + ": " + match);
                      if (match && plugin.type === type) {
                          logger.debug("adding " + plugin.name + " to list");
                          newPlugins.push(plugin);
                      } else {
                          logger.debug("not adding " + plugin.name + " to list");
                      }
                  }, this);
              }
  
              return newPlugins;
  
          }
docs: Returns just the plugins from the given array with pointcuts that match the
  service/method and passed type.
  
  @param serviceName - the name of the service to match against.
  @param methodName - the name of the method on the service to match against.
  @param type - the type of plugin to match.
  @param plugins - the array of plugins to use as the domain.