Skip to content

JAXB2 SimpleHashCode Plugin

highsource edited this page Dec 18, 2014 · 4 revisions

JAXB2 HashCodeEquals Plugin

Adds deep, reflection-free, runtime-free hashCode() methods to the schema-derived classes.

This plugin also handles JAXBElements and, arrays and primitive types to generate the best possible hashCode() methods.

Unlike the JAXB2 HashCode Plugin, this plugin does not require runtime libraries. But at the same time the generated methods do not accept locators or strategies.

Usage

  • Activate the plugin using the -XsimpleHashCode switch.

See Using JAXB2 Basics Plugins.

Example

See the following test project for usage example.