newFormat.append(format.substring(start, loc));
int end = format.indexOf(")", loc);
String argName = format.substring(loc+1, end);
if ( !PropertyUtils.isReadable(argBean, argName)) {
throw new MissingFormatArgumentException(argName);
}
try {
Object value = PropertyUtils.getProperty(argBean, argName);
newArgs[argCount++] = value;
} catch (InvocationTargetException e) {
throw new MissingFormatArgumentException("Exception while getting: (InvocationTargetException)" + argName);
} catch (IllegalAccessException e) {
throw new MissingFormatArgumentException("Exception while getting: (IllegalAccessException)" + argName);
} catch (NoSuchMethodException e) {
throw new MissingFormatArgumentException("Exception while getting: (NoSuchMethodException)" + argName);
}
start = end+1;
loc = format.indexOf("%(", start);
}
newFormat.append(format.substring(start));