Search code examples
javaxstreamoptaplanner

Why do we use XStream annotations in Optaplanner


I am new to OptaPlanner and trying to understand the code and I observed below annotations being used in many places in the code but I don't think we are using serialization anywhere in our project. Could someone explain when, on what classes, and why do we use below annotations in optaplanner

@XStreamAlias @XStreamInclude @XStreamConverter


Solution

  • That's just the examples UI that read/writes to XML, it's not related to optaplanner-core at all. If you read/write to JSON (jackson) or a database (JPA/hibernate), you'd delete those.

    To see what they do, go to the XStream website and see the "annotations" page.