@Override
  public void serialize(@NotNull Object bean, @NotNull Element parent, @Nullable SerializationFilter filter) {
    Object value = accessor.read(bean);
    if (value == null) {
      return;
    }

    if (value instanceof Element) {
      parent.addContent(((Element)value).clone().setName(tagName));
    }
    else if (value instanceof Element[]) {
      Element[] elements = (Element[])value;
      if (elements.length != 0) {
        List<Element> result = new ArrayList<>(elements.length);
        for (Element element : elements) {
          result.add(element.clone().setName(tagName));
        }
        parent.addContent(result);
      }
    }
    else {
      throw new XmlSerializationException("org.jdom.Element expected but " + value + " found");
    }
  }
@Override
  public void serialize(@NotNull Object bean, @NotNull Element parent, @Nullable SerializationFilter filter)