Object (Object context, @NotNull Element element) { @SuppressWarnings("unchecked") List<String> list = (List<String>)context; list.clear(); if (element.getName().equals(name)) { for (Element item : element.getChildren("item")) { ContainerUtil.addIfNotNull(list, item.getAttributeValue("value")); } } else { // JDOMExternalizableStringList format Element value = element.getChild("value"); if (value != null) { value = value.getChild("list"); } if (value != null) { for (Element item : value.getChildren("item")) { ContainerUtil.addIfNotNull(list, item.getAttributeValue("itemvalue")); } } } return list; }