aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac/apt
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2012-08-28 09:14:41 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2012-08-28 09:17:01 +0200
commit70256754c2587361c9f70287f62c1e3fd2dede10 (patch)
tree464b128f4e7453760a714f9a2fad67e644c09482 /src/core/lombok/javac/apt
parent672ddda8f5b27b0a97ff00413edf6d159885d636 (diff)
downloadlombok-70256754c2587361c9f70287f62c1e3fd2dede10.tar.gz
lombok-70256754c2587361c9f70287f62c1e3fd2dede10.tar.bz2
lombok-70256754c2587361c9f70287f62c1e3fd2dede10.zip
If the JVM is started with -Dlombok.disable, lombok is disabled entirely for both eclipse/ecj and javac operations.
Diffstat (limited to 'src/core/lombok/javac/apt')
-rw-r--r--src/core/lombok/javac/apt/Processor.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/lombok/javac/apt/Processor.java b/src/core/lombok/javac/apt/Processor.java
index 94e0e644..96150b06 100644
--- a/src/core/lombok/javac/apt/Processor.java
+++ b/src/core/lombok/javac/apt/Processor.java
@@ -75,10 +75,16 @@ public class Processor extends AbstractProcessor {
private JavacProcessingEnvironment processingEnv;
private JavacTransformer transformer;
private Trees trees;
+ private boolean lombokDisabled = false;
/** {@inheritDoc} */
@Override public void init(ProcessingEnvironment procEnv) {
super.init(procEnv);
+ if (System.getProperty("lombok.disable") != null) {
+ lombokDisabled = true;
+ return;
+ }
+
this.processingEnv = (JavacProcessingEnvironment) procEnv;
placePostCompileAndDontMakeForceRoundDummiesHook();
transformer = new JavacTransformer(procEnv.getMessager());
@@ -223,6 +229,7 @@ public class Processor extends AbstractProcessor {
/** {@inheritDoc} */
@Override public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
+ if (lombokDisabled) return false;
if (roundEnv.processingOver()) return false;
// We have: A sorted set of all priority levels: 'priorityLevels'