Element () { Element component = new Element("component"); if (!hasDefaultValues()) { try { DefaultJDOMExternalizer.writeExternal(this, component); } catch (WriteExternalException e) { LOG.error(e); } } if (myInstrumentedNotNulls.size() != 1 || !NOT_NULL.equals(myInstrumentedNotNulls.get(0))) { // poor man's @XCollection(style = XCollection.Style.v2) Element instrumentedNotNulls = new Element(INSTRUMENTED_NOT_NULLS_TAG); for (String value : myInstrumentedNotNulls) { instrumentedNotNulls.addContent(new Element("option").setAttribute("value", value)); } component.addContent(instrumentedNotNulls); } return component; }