aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/EqualsAndHashCode.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2013-12-22 04:40:54 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2014-01-18 18:55:52 +0100
commitd680f8c7f48b6a982c2cea0e8758716eee4807bc (patch)
tree7b4465ecd8c07bec61402f1f65e9b4ff550a51e2 /src/core/lombok/EqualsAndHashCode.java
parentf6eef8e50a9cde3643541c077bd138230ff5b96a (diff)
downloadlombok-d680f8c7f48b6a982c2cea0e8758716eee4807bc.tar.gz
lombok-d680f8c7f48b6a982c2cea0e8758716eee4807bc.tar.bz2
lombok-d680f8c7f48b6a982c2cea0e8758716eee4807bc.zip
[configuration] initial batch of configuration keys, primarily for flag usages.
Diffstat (limited to 'src/core/lombok/EqualsAndHashCode.java')
-rw-r--r--src/core/lombok/EqualsAndHashCode.java12
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()}.