* Helper method to convert a java.lang.reflect.Method into a GeneratorMethodInfo
* and add it to the methods map.
*/
static void addMethod(final Method m, HashMap<String, ArrayList<GeneratorMethodInfo>> map) {
String name = m.getName();
Name nameAnnotation = m.getAnnotation(Name.class);
if(nameAnnotation != null) name = nameAnnotation.value();
ArrayList<GeneratorMethodInfo> overloads = map.get(name);
if(overloads == null) map.put(m.getName(), overloads = new ArrayList<GeneratorMethodInfo>());
GeneratorTypeInfo[] parameterTypes = new GeneratorTypeInfo[m.getParameterTypes().length];
for(int i=0; i < parameterTypes.length; i++) {
parameterTypes[i] = wrap(m.getParameterTypes()[i]);