diff options
author | Christian Sterzl <christian.sterzl@gmail.com> | 2014-04-03 08:11:16 +0200 |
---|---|---|
committer | Christian Sterzl <christian.sterzl@gmail.com> | 2014-04-03 08:11:16 +0200 |
commit | 3d32cd85f174bbeb54ea0c102e029c42daf51931 (patch) | |
tree | 6d9144ca2fbd9167a85f68b6f761c6904e4d19ef /src/core/lombok/EqualsAndHashCode.java | |
parent | 6afa3d2ec9ec18ed8ae5f6c5217b9fb1710c69c7 (diff) | |
download | lombok-3d32cd85f174bbeb54ea0c102e029c42daf51931.tar.gz lombok-3d32cd85f174bbeb54ea0c102e029c42daf51931.tar.bz2 lombok-3d32cd85f174bbeb54ea0c102e029c42daf51931.zip |
Adding onParam to annotation @EqualsAndHashCode to add individual annotations to the parameters of equals and canEqual.
Diffstat (limited to 'src/core/lombok/EqualsAndHashCode.java')
-rw-r--r-- | src/core/lombok/EqualsAndHashCode.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/lombok/EqualsAndHashCode.java b/src/core/lombok/EqualsAndHashCode.java index 60ed9e7a..de9c43ba 100644 --- a/src/core/lombok/EqualsAndHashCode.java +++ b/src/core/lombok/EqualsAndHashCode.java @@ -61,4 +61,19 @@ public @interface EqualsAndHashCode { * <strong>default: false</strong> */ boolean doNotUseGetters() default false; + + /** + * Any annotations listed here are put on the generated parameter of {@code equals} and {@code canEqual}. The syntax for this feature is: {@code @EqualsAndHashCode(onParam=@__({@AnnotationsGoHere}))} + * This is useful to add for example a {@code Nullable} annotation. + */ + AnyAnnotation[] onParam() default @AnyAnnotation; + + /** + * Placeholder annotation to enable the placement of annotations on the generated code. + * @deprecated Don't use this annotation, ever - Read the documentation. + */ + @Deprecated + @Retention(RetentionPolicy.SOURCE) + @Target({}) + @interface AnyAnnotation {} } |