org.babyfish.jimmer.apt.entry.AbstractSummaryGenerator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jimmer-apt Show documentation
Show all versions of jimmer-apt Show documentation
A revolutionary ORM framework for both java and kotlin
package org.babyfish.jimmer.apt.entry;
import java.util.HashMap;
import java.util.Map;
public class AbstractSummaryGenerator {
private Map nameCountMap = new HashMap<>();
protected String distinctName(String name) {
int count = nameCountMap.getOrDefault(name, 1);
nameCountMap.put(name, count + 1);
if (count == 1) {
return name;
}
return name + '_' + count;
}
}