54 lines
2.2 KiB
Java
54 lines
2.2 KiB
Java
package lombok.core;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.Collection;
|
|
import java.util.Collections;
|
|
import java.util.HashMap;
|
|
import java.util.Iterator;
|
|
import java.util.Map;
|
|
/* loaded from: com.discord-117014.apk:lombok/core/LombokInternalAliasing.SCL.lombok */
|
|
public class LombokInternalAliasing {
|
|
public static final Map<String, String> ALIASES;
|
|
public static final Map<String, Collection<String>> REVERSE_ALIASES;
|
|
|
|
static {
|
|
HashMap hashMap = new HashMap();
|
|
hashMap.put("lombok.experimental.Value", "lombok.Value");
|
|
hashMap.put("lombok.experimental.Builder", "lombok.Builder");
|
|
hashMap.put("lombok.experimental.var", "lombok.var");
|
|
hashMap.put("lombok.Delegate", "lombok.experimental.Delegate");
|
|
hashMap.put("lombok.experimental.Wither", "lombok.With");
|
|
ALIASES = Collections.unmodifiableMap(hashMap);
|
|
HashMap hashMap2 = new HashMap();
|
|
Iterator it = hashMap.entrySet().iterator();
|
|
while (it.hasNext()) {
|
|
Map.Entry entry = (Map.Entry) it.next();
|
|
Collection collection = (Collection) hashMap2.get(entry.getValue());
|
|
if (collection == null) {
|
|
hashMap2.put((String) entry.getValue(), Collections.singleton((String) entry.getKey()));
|
|
} else if (collection.size() == 1) {
|
|
new ArrayList(2).addAll(collection);
|
|
hashMap2.put((String) entry.getValue(), collection);
|
|
} else {
|
|
collection.add((String) entry.getKey());
|
|
}
|
|
}
|
|
Iterator it2 = hashMap2.entrySet().iterator();
|
|
while (it2.hasNext()) {
|
|
Map.Entry entry2 = (Map.Entry) it2.next();
|
|
Collection collection2 = (Collection) entry2.getValue();
|
|
if (collection2.size() > 1) {
|
|
entry2.setValue(Collections.unmodifiableList((ArrayList) collection2));
|
|
}
|
|
}
|
|
REVERSE_ALIASES = Collections.unmodifiableMap(hashMap2);
|
|
}
|
|
|
|
public static String processAliases(String str) {
|
|
if (str == null) {
|
|
return null;
|
|
}
|
|
String str2 = ALIASES.get(str);
|
|
return str2 == null ? str : str2;
|
|
}
|
|
}
|