From 12d6d2c521c8fa6bb9898819ca0c42f00eb1e487 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 28 Jul 2009 17:42:07 +0200 Subject: Updated the javadoc of EqualsAndHashCode and ToString (the annotation source files) --- src/lombok/EqualsAndHashCode.java | 1 + src/lombok/ToString.java | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/lombok/EqualsAndHashCode.java b/src/lombok/EqualsAndHashCode.java index 715dbd7a..ac2b95a1 100644 --- a/src/lombok/EqualsAndHashCode.java +++ b/src/lombok/EqualsAndHashCode.java @@ -64,6 +64,7 @@ public @interface EqualsAndHashCode { /** * Call on the superclass's implementations of equals and hashCode before calculating * for the fields in this class. + * default: false */ boolean callSuper() default false; } diff --git a/src/lombok/ToString.java b/src/lombok/ToString.java index 8067f647..5bcba540 100644 --- a/src/lombok/ToString.java +++ b/src/lombok/ToString.java @@ -36,7 +36,7 @@ import java.lang.annotation.Target; * All fields that are non-static are used in the toString generation. You can exclude fields by specifying them * in the exclude parameter. *

- * Array fields are handled by way of {@link java.util.Arrays#deepToString(Object[], Object[])} where necessary. + * Array fields are handled by way of {@link java.util.Arrays#deepToString(Object[])} where necessary. * The downside is that arrays with circular references (arrays that contain themselves, * possibly indirectly) results in calls to toString throwing a * {@link java.lang.StackOverflowError}. However, the implementations for java's own {@link java.util.ArrayList} suffer @@ -51,7 +51,20 @@ import java.lang.annotation.Target; @Target(ElementType.TYPE) @Retention(RetentionPolicy.SOURCE) public @interface ToString { + /** + * Include the name of each field when printing it. + * default: false + */ boolean includeFieldNames() default false; - boolean callSuper() default false; + + /** + * Any fields listed here will not be printed in the generated toString implementation. + */ String[] exclude() default {}; + + /** + * Include the result of the superclass's implementation of toString in the output. + * default: false + */ + boolean callSuper() default false; } -- cgit