protected void initResource(Node resourceNode, Class enumType) throws ResourceBundleCreateException {
String id = (String) resourceNode.selectObject(ResourceBundleConstant.XPATH_RESOURCE_ID);
// 如果指定了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();