Class Comments
java.lang.Object
com.foursoft.harness.navext.runtime.io.write.xmlmeta.comments.Comments
Comments allows adding XML-comments to the output file. The comments are linked to JAXB elements
and added directly before the xml-element.
Example: If a Root-class exists which is serialized to <Root></Root>
the following code
<pre>
XMLWriter<Root> xmlWriter = new XMLWriter<>(Root.class);
Root root = new Root();
XMLMeta xmlMeta = new XMLMeta();
Comments comments = new Comments();
comments.put(root, "TestComment");
xmlMeta.setComments(comments);
String content = xmlWriter.writeToString(root, xmlMeta);
</pre>
would result content in containing
<pre>
<!--TestComment-->
<Root></Root>
</pre>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Comments
public Comments()
-
-
Method Details
-
containsKey
-
get
-
put
-