Package org.mapstruct
Annotation Type Javadoc
Allows the definition of Javadoc comments in the MapStruct
Mapper generated class.
The annotation provides support for the usual Javadoc comments elements by defining analogous attributes.
Please, note that at least one of these attributes must be specified.
For instance, the following definition;
@Javadoc(
value = "This is the description",
authors = { "author1", "author2" },
deprecated = "Use {@link OtherMapper} instead",
since = "0.1"
)
will generate:
/**
* This is the description
*
* @author author1
* @author author2
*
* @deprecated Use {@link OtherMapper} instead
* @since 0.1
*/
The entire Javadoc comment block can be passed directly:
@Javadoc("This is the description\n"
+ "\n"
+ "@author author1\n"
+ "@author author2\n"
+ "\n"
+ "@deprecated Use {@link OtherMapper} instead\n"
+ "@since 0.1\n"
)
// or using Text Blocks
@Javadoc(
"""
This is the description
@author author1
@author author2
@deprecated Use {@link OtherMapper} instead
@since 0.1
"""
)
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionString[]List of authors of the code that it is being documented.Specifies that the functionality that is being documented is deprecated.Specifies the version since the functionality that is being documented is available.Main Javadoc comment text block.
-
Element Details
-
value
String valueMain Javadoc comment text block.- Returns:
- Main Javadoc comment text block.
- Default:
""
-
authors
String[] authorsList of authors of the code that it is being documented.It will generate a list of the Javadoc tool comment element
@authorwith the different values and in the order provided.- Returns:
- array of javadoc authors.
- Default:
{}
-
deprecated
String deprecatedSpecifies that the functionality that is being documented is deprecated.Corresponds to the
@deprecatedJavadoc tool comment element.- Returns:
- Deprecation message about the documented functionality
- Default:
""
-
since
String sinceSpecifies the version since the functionality that is being documented is available.Corresponds to the
@sinceJavadoc tool comment element.- Returns:
- Version since the functionality is available
- Default:
""
-