return expandSugar(baseClass, config.root().get(category), codec);
}
public static ConfigObject expandSugar(Class<?> type, ConfigValue config, CodecConfig codec) {
CodableClassInfo typeInfo = codec.getOrCreateClassInfo(type);
PluginMap pluginMap = typeInfo.getPluginMap();
ConfigObject root = resolveType(type, config, pluginMap);
String classField = pluginMap.classField();
if (root.get(classField) != null) {
try {
type = pluginMap.getClass((String) root.get(classField).unwrapped());
} catch (ClassNotFoundException ignored) {
// try not to throw exceptions or at least checked exceptions from this helper method
}
}
return expandSugarSkipResolve(type, root, codec);