class ProductTypeRangeListXStreamProvider implements XStreamProvider<RangeList> {

    private XStream provide() {
        if (this.xStream == null) {
            XStream xStream = new XStream(new DomDriver());
            xStream.addPermission(AnyTypePermission.ANY);

            xStream.addDefaultImplementation(ArrayList.class, List.class);
            xStream.addDefaultImplementation(RangeNodeImpl.class, RangeNode.class);
            xStream.addDefaultImplementation(DisplayValueImpl.class, DisplayValue.class);

            xStream.alias("range-list", RangeListImpl.class);
            xStream.alias("range", RangeNode.class);
            xStream.alias("display", DisplayValue.class);

            this.xStream = xStream;
        }
        return this.xStream;
    }

}