class AliasStrings {
/**
* Outputs a log of all strings used more than once in the code.
*/
private void outputStringUsage() {
StringBuilder sb = new StringBuilder("Strings used more than once:\n");
for (String str : stringInfoMap.keySet()) {
StringInfo info = stringInfoMap.get(str);
if (info.numOccurrences > 1) {
sb.append(info.numOccurrences);
sb.append(": ");
sb.append(str);
sb.append('\n');
}
}
// TODO(user): Make this save to file OR output to the application
logger.info(sb.toString());
}
}