Object (Object context, @NotNull XmlElement element) { @SuppressWarnings("unchecked") List<String> list = (List<String>)context; list.clear(); if (element.name.equals(name)) { for (XmlElement item : element.children) { if (item.name.equals("item")) { String v = item.attributes.get("value"); if (v != null) { list.add(v); } } } } else { // JDOMExternalizableStringList format XmlElement value = element.getChild("value"); if (value != null) { value = value.getChild("list"); } if (value != null) { for (XmlElement item : value.children) { if (item.name.equals("item")) { String v = item.getAttributeValue("itemvalue"); if (v != null) { list.add(v); } } } } } return list; }