public abstract class XStreamCache implements Product {
private final XStream xstream;
public XStreamCache() {
JVM jvm = new JVM();
ClassLoaderReference classLoaderReference = new ClassLoaderReference(
new CompositeClassLoader());
DefaultConverterLookup converterLookup = new DefaultConverterLookup();
xstream = new XStream(
jvm.bestReflectionProvider(), new XppDriver(), classLoaderReference, buildMapper(
getMappers(jvm), jvm, classLoaderReference, converterLookup), converterLookup, converterLookup);
xstream.alias("one", One.class);
xstream.alias("five", Five.class);
xstream.alias("ser-one", SerializableOne.class);
xstream.alias("ser-five", SerializableFive.class);