Example #1
0
 public void marshall(PrintWriter wrt, String prefix, Token value) throws Exception {
   wrt.print(prefix);
   wrt.print("token.id=");
   if (value != null) {
     wrt.println(value.getId());
   }
 }
Example #2
0
 public void marshall(XMLStreamWriter wrt, Token value) throws Exception {
   String token = (value != null) ? value.getId() : null;
   wrt.writeStartElement("token");
   if (token != null) {
     wrt.writeAttribute("id", token);
   }
   wrt.writeEndElement();
 }