Annotation Type Comments
This annotation can be repeated multiple times to specify comments in different locations. Writing this annotation multiple times for the same location will append additional comments at that location.
Usage on a method
This annotation is frequently applied to configuration methods. If applied, the comments will be attached to that method where it is declared (due to the nature of Java inheritance, comments may need to be re-specified if the method is overidden).
Usage on a class
This annotation can also be applied to a class. If the annotated class is used as a configuration interface, the comments specified will become top-level comments in the configuration definition (e.g., header and footer).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceThe repeatable annotations container for adding multiple comments. -
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescription@NonNull CommentLocationWhere the comments should be located.
-
Element Details
-
value
@NonNull String @NonNull [] valueThe comments themselves. Each value in the array will be placed on a new line.- Returns:
- the comments to add
-
location
@NonNull CommentLocation locationWhere the comments should be located.This function will add the comments on the corresponding data entry via
DataEntry.withComments(CommentLocation, List)using the given location, merging with existing comments at that location as necessary.If no location is specified, the default is
ABOVE.- Returns:
- where to place the comments
- Default:
ABOVE
-