// 如果指定了enum属性, 则以此enum值作为resource key.
if (enumType != null) {
Enum enumObj = Enum.getEnumByName(enumType, id);
if (enumObj == null) {
throw new ResourceBundleCreateException(ResourceBundleConstant.RB_ENUM_ID_NOT_FOUND, new Object[] { id,
enumType.getName() }, null);
}
id = enumObj.toString();
}
Object value = null;
String type = resourceNode.getName();
if (ResourceBundleConstant.RB_RESOURCE_TYPE_MESSAGE.equals(type)) {
value = getMessageResource(id, resourceNode);
} else if (ResourceBundleConstant.RB_RESOURCE_TYPE_MAP.equals(type)) {
value = getMapResource(id, resourceNode);
} else if (ResourceBundleConstant.RB_RESOURCE_TYPE_LIST.equals(type)) {
value = getListResource(id, resourceNode);
}
if (values.containsKey(id)) {
throw new ResourceBundleCreateException(ResourceBundleConstant.RB_DUPLICATED_RESOURCE_KEY,
new Object[] { id }, null);
}
values.put(id, value);
}