XStream-XML to Object
XStream-XML to Object
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
package com.baeldung.initializer;
|
||||
|
||||
import com.thoughtworks.xstream.XStream;
|
||||
|
||||
public class SimpleXstreamInitializer {
|
||||
|
||||
private static XStream xtreamInstance;
|
||||
|
||||
public static XStream getXstreamInstance() {
|
||||
if (xtreamInstance == null) {
|
||||
synchronized (SimpleXstreamInitializer.class) {
|
||||
if (xtreamInstance == null) {
|
||||
xtreamInstance = new XStream();
|
||||
}
|
||||
}
|
||||
}
|
||||
return xtreamInstance;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user