public class XStreamXmlSolverFactory extends SolverFactory
Solver
with XStream
.SolverFactory
Modifier and Type | Field and Description |
---|---|
protected SolverConfig |
solverConfig |
protected com.thoughtworks.xstream.XStream |
xStream |
Constructor and Description |
---|
XStreamXmlSolverFactory() |
Modifier and Type | Method and Description |
---|---|
void |
addXStreamAnnotations(Class... xStreamAnnotations) |
Solver |
buildSolver()
Creates a new
Solver instance. |
static com.thoughtworks.xstream.XStream |
buildXStream()
Builds the
XStream setup which is used to read/write solver configs and benchmark configs. |
XStreamXmlSolverFactory |
configure(File solverConfigFile) |
XStreamXmlSolverFactory |
configure(InputStream in) |
XStreamXmlSolverFactory |
configure(Reader reader) |
XStreamXmlSolverFactory |
configure(String solverConfigResource) |
SolverConfig |
getSolverConfig()
Allows you to problematically change the
SolverConfig at runtime before building the Solver . |
com.thoughtworks.xstream.XStream |
getXStream() |
createFromXmlFile, createFromXmlInputStream, createFromXmlReader, createFromXmlResource
protected com.thoughtworks.xstream.XStream xStream
protected SolverConfig solverConfig
public static com.thoughtworks.xstream.XStream buildXStream()
XStream
setup which is used to read/write solver configs and benchmark configs.
It should never be used to read/write Solution
instances. Use XStreamSolutionFileIO for that instead.public void addXStreamAnnotations(Class... xStreamAnnotations)
xStreamAnnotations
- never nullXStream.processAnnotations(Class[])
public com.thoughtworks.xstream.XStream getXStream()
public XStreamXmlSolverFactory configure(String solverConfigResource)
solverConfigResource
- never null, a classpath resource
as defined by ClassLoader.getResource(String)
public XStreamXmlSolverFactory configure(File solverConfigFile)
public XStreamXmlSolverFactory configure(InputStream in)
public XStreamXmlSolverFactory configure(Reader reader)
public SolverConfig getSolverConfig()
SolverFactory
SolverConfig
at runtime before building the Solver
.getSolverConfig
in class SolverFactory
public Solver buildSolver()
SolverFactory
Solver
instance.buildSolver
in class SolverFactory
Copyright © 2006–2015 JBoss by Red Hat. All rights reserved.