Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.2.0.Beta3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.optaplanner.core.impl.solver
Class XStreamXmlSolverFactory

    java.lang.Object
      org.optaplanner.core.api.solver.SolverFactory
          org.optaplanner.core.impl.solver.XStreamXmlSolverFactory

    public class XStreamXmlSolverFactory

extends SolverFactory

XML based configuration that builds a `Solver` with `XStream`.

See Also:
  `SolverFactory`

Constructor Summary
`XStreamXmlSolverFactory()`

Method Summary
`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`.

Methods inherited from class org.optaplanner.core.api.solver.SolverFactory
`createFromXmlFile, createFromXmlInputStream, createFromXmlReader, createFromXmlResource`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XStreamXmlSolverFactory

    public XStreamXmlSolverFactory()

Method Detail

### buildXStream

    public static com.thoughtworks.xstream.XStream buildXStream()

  Builds the `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.

  Returns:
    never null.

### addXStreamAnnotations

    public void addXStreamAnnotations(Class... xStreamAnnotations)

### configure

    public XStreamXmlSolverFactory configure(String solverConfigResource)

  Parameters:
    `solverConfigResource` - never null, a classpath resource as defined by `ClassLoader.getResource(String)`
  Returns:
    this

### configure

    public XStreamXmlSolverFactory configure(File solverConfigFile)

### configure

    public XStreamXmlSolverFactory configure(InputStream in)

### configure

    public XStreamXmlSolverFactory configure(Reader reader)

### getSolverConfig

    public SolverConfig getSolverConfig()

  Description copied from class: `SolverFactory`
  Allows you to problematically change the `SolverConfig` at runtime before building the `Solver`.

  Specified by:
    `getSolverConfig` in class `SolverFactory`
  Returns:
    never null

### buildSolver

    public Solver buildSolver()

  Description copied from class: `SolverFactory`
  Creates a new `Solver` instance.

  Specified by:
    `buildSolver` in class `SolverFactory`
  Returns:
    never null

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.2.0.Beta3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.