diff options
Diffstat (limited to 'src/core/lombok/EqualsAndHashCode.java')
-rw-r--r-- | src/core/lombok/EqualsAndHashCode.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/core/lombok/EqualsAndHashCode.java b/src/core/lombok/EqualsAndHashCode.java index 8b809c4b..a4f0ed45 100644 --- a/src/core/lombok/EqualsAndHashCode.java +++ b/src/core/lombok/EqualsAndHashCode.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2012 The Project Lombok Authors. + * Copyright (C) 2009-2013 The Project Lombok Authors. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -26,6 +26,9 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import lombok.core.FlagUsageType; +import lombok.core.configuration.ConfigurationKey; + /** * Generates implementations for the {@code equals} and {@code hashCode} methods inherited by all objects, based on relevant fields. * <p> @@ -35,6 +38,13 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.SOURCE) public @interface EqualsAndHashCode { /** + * lombok configuration: {@code lombok.EqualsAndHashCode.flagUsage} = {@code WARNING} | {@code ERROR}. + * + * If set, <em>any</em> usage of {@code @EqualsAndHashCode} results in a warning / error. + */ + ConfigurationKey<FlagUsageType> FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.EqualsAndHashCode.flagUsage") {}; + + /** * Any fields listed here will not be taken into account in the generated * {@code equals} and {@code hashCode} implementations. * Mutually exclusive with {@link #of()}. |