//first find all the matching method names
List nodes = getMatches(mapping, "./method[@name='" + method.getName() + "']");
//remove the ones that aren't in our acceptable set, if one is specified
if(availableNodes != null)
{
nodes.retainAll(availableNodes);
}
//no name found, so no matches
if(nodes.size() == 0) return null;
//if the method has no params, then more than one mapping is pointless
Class[] parameterTypes = method.getParameterTypes();