Class AbstractXStreamService<T>
- java.lang.Object
-
- cern.accsoft.steering.jmad.util.xml.GenericXStreamService<T>
-
- cern.accsoft.steering.jmad.util.xml.AbstractXStreamService<T>
-
- All Implemented Interfaces:
PersistenceService<T>
- Direct Known Subclasses:
JsonXStreamService
,XmlXStreamService
public abstract class AbstractXStreamService<T> extends GenericXStreamService<T>
-
-
Constructor Summary
Constructors Constructor Description AbstractXStreamService()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected com.thoughtworks.xstream.XStream
createXStream()
This method must be implemented by subclass and has to return a properly configured XStream object.protected com.thoughtworks.xstream.XStream
getXstream()
protected abstract void
initializeXStream​(com.thoughtworks.xstream.XStream xstream)
Force implementing classes to initialize theXStream
instance used in this service.protected abstract com.thoughtworks.xstream.XStream
newXStreamInstance()
-
Methods inherited from class cern.accsoft.steering.jmad.util.xml.GenericXStreamService
clone, getSaveableClass, isCorrectFileName, load, load, save, save, save, save
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cern.accsoft.steering.jmad.util.xml.PersistenceService
getFileExtension
-
-
-
-
Method Detail
-
createXStream
protected com.thoughtworks.xstream.XStream createXStream()
Description copied from class:GenericXStreamService
This method must be implemented by subclass and has to return a properly configured XStream object.- Specified by:
createXStream
in classGenericXStreamService<T>
- Returns:
- a fully configured xstream object
-
newXStreamInstance
protected abstract com.thoughtworks.xstream.XStream newXStreamInstance()
- Returns:
- a new XStream instance
-
initializeXStream
protected abstract void initializeXStream​(com.thoughtworks.xstream.XStream xstream)
Force implementing classes to initialize theXStream
instance used in this service. E.g. register converters, set aliases, process annotations, ...- Parameters:
xstream
- theXStream
instance used in this service
-
getXstream
protected com.thoughtworks.xstream.XStream getXstream()
- Returns:
- the
XStream
used in the service
-
-