if (args == 0)
{
return method.getName();
}
StrBuilder methodKey = new StrBuilder((args+1)*16).append(method.getName());
for (int j = 0; j < args; j++)
{
/*
* If the argument type is primitive then we want
* to convert our primitive type signature to the
* corresponding Object type so introspection for
* methods with primitive types will work correctly.
*
* The lookup map (convertPrimitives) contains all eight
* primitives (boolean, byte, char, double, float, int, long, short)
* known to Java. So it should never return null for the key passed in.
*/
if (parameterTypes[j].isPrimitive())
{
methodKey.append((String) convertPrimitives.get(parameterTypes[j]));
}
else
{
methodKey.append(parameterTypes[j].getName());
}
}
return methodKey.toString();
}