From 5a5f465a0433bef33ddb1260c338b26e1598501c Mon Sep 17 00:00:00 2001 From: Peter Grant Date: Mon, 26 Jan 2015 13:41:07 -0800 Subject: [i623] Added javac impl of javax.annotation.Generated --- src/delombok/lombok/delombok/FormatPreferences.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/delombok') diff --git a/src/delombok/lombok/delombok/FormatPreferences.java b/src/delombok/lombok/delombok/FormatPreferences.java index 9bd668a5..caacc246 100644 --- a/src/delombok/lombok/delombok/FormatPreferences.java +++ b/src/delombok/lombok/delombok/FormatPreferences.java @@ -33,6 +33,7 @@ public final class FormatPreferences { private final boolean generateConstructorProperties; private final boolean generateSuppressWarnings, danceAroundIdeChecks, generateDelombokComment, javaLangAsFqn; final Map rawMap; + private final boolean generateGenerated; static final Map KEYS; @@ -46,6 +47,7 @@ public final class FormatPreferences { keys.put("danceAroundIdeChecks", "Either 'generate' or 'skip'. generate means: Lombok will intentionally obfuscate some generated code to avoid IDE warnings. Default: 'generate'"); keys.put("generateDelombokComment", "Either 'generate' or 'skip'. generate means: Any file modified by delombok will have a comment stating this at the top. Default: 'generate'"); keys.put("javaLangAsFQN", "Either 'generate' or 'skip'. generate means: Any generated reference to java.lang classes are prefixed with `java.lang.`. Default: 'generate'"); + keys.put("generated", "Either 'generate' or 'skip'. generate means: All lombok-generated methods get a @Generated(\"lombok\") annotation. Default: 'generate'"); KEYS = Collections.unmodifiableMap(keys); } @@ -85,6 +87,7 @@ public final class FormatPreferences { this.danceAroundIdeChecks = unrollBoolean(preferences, "danceAroundIdeChecks", "generate", "skip", true); this.generateDelombokComment = unrollBoolean(preferences, "generateDelombokComment", "generate", "skip", true); this.javaLangAsFqn = unrollBoolean(preferences, "javaLangAsFQN", "generate", "skip", true); + this.generateGenerated = unrollBoolean(preferences, "generated", "generate", "skip", true); } private static boolean unrollBoolean(Map preferences, String name, String trueStr, String falseStr, boolean defaultVal) { @@ -131,4 +134,8 @@ public final class FormatPreferences { public boolean generateConstructorProperties() { return generateConstructorProperties; } + + public boolean generateGenerated() { + return generateGenerated; + } } -- cgit