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()); } }
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(); }