Package lombok
Annotation Type ToString
-
@Target(TYPE) @Retention(SOURCE) public @interface ToStringGenerates an implementation for thetoStringmethod inherited by all objects, consisting of printing the values of relevant fields.Complete documentation is found at the project lombok features page for @ToString.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleancallSuperInclude the result of the superclass's implementation oftoStringin the output.booleandoNotUseGettersNormally, if getters are available, those are called.java.lang.String[]excludeAny fields listed here will not be printed in the generatedtoStringimplementation.booleanincludeFieldNamesInclude the name of each field when printing it.java.lang.String[]ofIf present, explicitly lists the fields that are to be printed.booleanonlyExplicitlyIncludedOnly include fields and methods explicitly marked with@ToString.Include.
-
-
-
-
exclude
java.lang.String[] exclude
Any fields listed here will not be printed in the generatedtoStringimplementation. Mutually exclusive withof().Will soon be marked
@Deprecated; use the@ToString.Excludeannotation instead.- Returns:
- A list of fields to exclude.
- Default:
- {}
-
-
-
of
java.lang.String[] of
If present, explicitly lists the fields that are to be printed. Normally, all non-static fields are printed.Mutually exclusive with
exclude().Will soon be marked
@Deprecated; use the@ToString.Includeannotation together with@ToString(onlyExplicitlyIncluded = true).- Returns:
- A list of fields to use (default: all of them).
- Default:
- {}
-
-