Skip to content

JAXB2 Commons Lang Plugin

Laurent Schoelens edited this page Aug 29, 2023 · 2 revisions

Commons Lang Plugin

Automatically generates the toString(), hashCode() and equals() methods using Jakarta's org.apache.commons:commons-lang3 library.

Activation

The plugin is activated by the -Xcommons-lang

It supports the optional -Xcommons-lang:ToStringStyle command line parameter to specify the style for use within the toString method.

Example 1 :

  -Xcommons-lang
  -Xcommons-lang:ToStringStyle=SIMPLE_STYLE

to specify the use of org.apache.commons.lang3.builder.ToStringStyle.SIMPLE_STYLE

Example 2 :

  -Xcommons-lang
  -Xcommons-lang:ToStringStyle=my.CustomToStringStyle

to specify the use of my.CustomToStringStyle, which must be a subclass of org.apache.commons.lang3.builder.ToStringStyle, and contains a public no-arg constructor.

The default ToStringStyle adopted by this plugin is MULTI_LINE_STYLE.

Clone this wiki locally