Skip to content
Laurent Schoelens edited this page Aug 25, 2023 · 5 revisions

JAXB2 Basic

JAXB2 Basics is an open source project, part of the JAXB Tools repository, which provides useful plugins and tools for JAXB 2.x reference implementation.

Documentation

Using JAXB2 Basics

JAXB2 Basics Plugins

These plugins are available :

  • JAXB2 SimpleEquals Plugin - generates runtime-free reflection-free equals(...) methods.
  • JAXB2 SimpleHashCode Plugin - generates runtime-free reflection-free hashCode() methods.
  • Equals Plugin - generates reflection-free equals(...) methods.
  • HashCode Plugin - generates reflection-free hashCode() methods.
  • ToString Plugin - generates reflection-free toString() methods.
  • Copyable Plugin - generates reflection-free copy(...) deep copying.
  • Mergeable Plugin - generates reflection-free merge(...) methods to merge data from two source objects into the given object.
  • Inheritance Plugin - makes schema-derived classes extend certain class or implement certain interfaces.
  • Wildcard Plugin - allows you to specify the wildcard mode for the wildcard properties.
  • AutoInheritance Plugin - makes classes derived from global elements or complex types extend or implement certain classes or interfaces automatically.
  • Setters Plugin - generates setters for collections.
  • Simplify Plugin - simplifies weird properties like aOrBOrC.
  • EnumValue Plugin - makes all the generated enums implement the EnumValue<T> interface.
  • JAXBIndex Plugin - generated jaxb.index files listing schema-derived classes.
  • FixJAXB1058 Plugin - fixes JAXB-1058.

New plugins from 2.0.4 version :

  • Commons Lang Plugin - generates the toString(), hashCode() and equals() methods using Apache commons-lang3.
  • Default Value Plugin - modifies the JAXB code model to set default values to the schema default attribute.
  • Fluent API Plugin - support a fluent api in addition to the default (JavaBean) setter methods.
  • Namespace Prefix Plugin - adds javax.xml.bind.annotation.XmlNs annotations to package-info.java files
  • Value Constructor Plugin - generates another constructor, taking an argument for each field in the class and initialises the field with the argument value.

Documentation is currently being moved from the old wiki :

https://github.com/highsource/jaxb2-basics/wiki/Home

Credits

Clone this wiki locally