01: /*
02: * Copyright (C) 2004, 2006 Joe Walnes.
03: * Copyright (C) 2007 XStream Committers.
04: * All rights reserved.
05: *
06: * The software in this package is published under the terms of the BSD
07: * style license a copy of which has been included with this distribution in
08: * the LICENSE.txt file.
09: *
10: * Created on 16. March 2004 by Joe Walnes
11: */
12: package com.thoughtworks.xstream;
13:
14: import com.thoughtworks.xstream.alias.ClassMapper;
15: import com.thoughtworks.xstream.converters.ConverterLookup;
16: import com.thoughtworks.xstream.converters.DataHolder;
17: import com.thoughtworks.xstream.core.DefaultConverterLookup;
18: import com.thoughtworks.xstream.io.HierarchicalStreamReader;
19: import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
20: import com.thoughtworks.xstream.mapper.Mapper;
21:
22: public interface MarshallingStrategy {
23:
24: Object unmarshal(Object root, HierarchicalStreamReader reader,
25: DataHolder dataHolder, ConverterLookup converterLookup,
26: Mapper mapper);
27:
28: void marshal(HierarchicalStreamWriter writer, Object obj,
29: ConverterLookup converterLookup, Mapper mapper,
30: DataHolder dataHolder);
31:
32: /**
33: * @deprecated As of 1.2, use {@link #unmarshal(Object, HierarchicalStreamReader, DataHolder, ConverterLookup, Mapper)}
34: */
35: Object unmarshal(Object root, HierarchicalStreamReader reader,
36: DataHolder dataHolder,
37: DefaultConverterLookup converterLookup,
38: ClassMapper classMapper);
39:
40: /**
41: * @deprecated As of 1.2, use {@link #marshal(HierarchicalStreamWriter, Object, ConverterLookup, Mapper, DataHolder)}
42: */
43: void marshal(HierarchicalStreamWriter writer, Object obj,
44: DefaultConverterLookup converterLookup,
45: ClassMapper classMapper, DataHolder dataHolder);
46:
47: }
|