mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 12:16:49 +00:00
Updated the javadoc of EqualsAndHashCode and ToString (the annotation source files)
This commit is contained in:
1 parent
fb6be45d2b
commit
12d6d2c521
2 files changed
+16
-2
No files matched your search
@@ -64,6 +64,7 @@ public @interface EqualsAndHashCode {
|
||||
/**
|
||||
* Call on the superclass's implementations of <code>equals</code> and <code>hashCode</code> before calculating
|
||||
* for the fields in this class.
|
||||
* <strong>default: false</strong>
|
||||
*/
|
||||
boolean callSuper() default false;
|
||||
}
|
||||
@@ -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 <code>exclude</code> parameter.
|
||||
* <p>
|
||||
* 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 <code>toString</code> 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.
|
||||
* <strong>default: false</strong>
|
||||
*/
|
||||
boolean includeFieldNames() default false;
|
||||
boolean callSuper() default false;
|
||||
|
||||
/**
|
||||
* Any fields listed here will not be printed in the generated <code>toString</code> implementation.
|
||||
*/
|
||||
String[] exclude() default {};
|
||||
|
||||
/**
|
||||
* Include the result of the superclass's implementation of <code>toString</code> in the output.
|
||||
* <strong>default: false</strong>
|
||||
*/
|
||||
boolean callSuper() default false;
|
||||
}
|
||||
Reference in new issue
Block a user