示例#1
0
  @Override
  public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {

    return Quality.fromName(reader.getValue());
  }
示例#2
0
  @Override
  public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) {
    Quality q = (Quality) source;

    writer.setValue(q == null ? "" : q.toString());
  }