public void save(Element e) { if (myMemento != null) { Element mementoElem = new Element(MEMENTO); MementoPersistence.saveMemento(myMemento, mementoElem); e.addContent(mementoElem); } if (myInspectorMemento != null) { Element mementoElem = new Element(INSPECTOR_MEMENTO); MementoPersistence.saveMemento(myInspectorMemento, mementoElem); e.addContent(mementoElem); } }