Skip to content

Package: XStreamCreator

XStreamCreator

nameinstructionbranchcomplexitylinemethod
XStreamCreator()
M: 0 C: 8
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
serializeXml(List)
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

Coverage

1: package networkconfigurator.xstream;
2:
3: import java.util.List;
4:
5: import com.thoughtworks.xstream.XStream;
6:
7: import networkconfigurator.item.Item;
8:
9: /**
10: *
11: * @author HFW416 Jannik
12: *
13: */
14: public class XStreamCreator {
15:
16:         /**
17:          * the XStream instance.
18:          */
19:         private final XStream xstream = new XStream();
20:
21:         /**
22:          * serialize the object to XML string.
23:          *
24:          * @param itemList
25:          * that should be serialize.
26:          *
27:          * @return XML string.
28:          */
29:         public String serializeXml(final List<Item> itemList) {
30:                 return xstream.toXML(itemList);
31:         }
32:
33: }