code: @Override
      public void writeContent(XMLExtendedStreamWriter writer, Resource value) throws XMLStreamException {
  
          if(value != null && this != value) {
              throw new IllegalStateException("Wrong target resource.");
          }
  
          writer.writeStartElement(ModuleConfigImpl.RESOURCE_ROOT);
          writer.writeAttribute(ModuleConfigImpl.PATH, path);
          writer.writeEndElement();
      }
docs: /* (non-Javadoc)
  @see org.jboss.staxmapper.XMLElementWriter#writeContent(org.jboss.staxmapper.XMLExtendedStreamWriter, java.lang.Object)