public QualifierConverter() {
super(QualifierModel.class);
}
public void marshal(Object value, HierarchicalStreamWriter writer, MarshallingContext context) {
QualifierModel qualifier = (QualifierModel) value;
writer.addAttribute("type", qualifier.getType());
if (qualifier.getValue() != null) {
writer.addAttribute("value", qualifier.getValue());
} else {
for (Map.Entry<String, String> entry : qualifier.getArguments().entrySet()) {
writer.startNode("arg");
writer.addAttribute("key", entry.getKey());
writer.addAttribute("value", entry.getValue());
writer.endNode();
}