aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac/JavacTransformer.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2018-07-25 23:19:00 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2018-07-25 23:19:00 +0200
commit7e94041dbc177476020969b00d3411020418f903 (patch)
treecc7640df890b2845c048c914047ebb92aade8527 /src/core/lombok/javac/JavacTransformer.java
parent7c3724c9dc03684b9e4ecb9b33296c894138add6 (diff)
downloadlombok-7e94041dbc177476020969b00d3411020418f903.tar.gz
lombok-7e94041dbc177476020969b00d3411020418f903.tar.bz2
lombok-7e94041dbc177476020969b00d3411020418f903.zip
Added key ‘dangerousconfig.lombok.disable’.
Diffstat (limited to 'src/core/lombok/javac/JavacTransformer.java')
-rw-r--r--src/core/lombok/javac/JavacTransformer.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/lombok/javac/JavacTransformer.java b/src/core/lombok/javac/JavacTransformer.java
index 54977a59..2e37b32b 100644
--- a/src/core/lombok/javac/JavacTransformer.java
+++ b/src/core/lombok/javac/JavacTransformer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009-2017 The Project Lombok Authors.
+ * Copyright (C) 2009-2018 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
@@ -35,6 +35,9 @@ import com.sun.tools.javac.tree.JCTree.JCVariableDecl;
import com.sun.tools.javac.util.Context;
import com.sun.tools.javac.util.List;
+import lombok.ConfigurationKeys;
+import lombok.core.LombokConfiguration;
+
public class JavacTransformer {
private final HandlerLibrary handlers;
private final Messager messager;
@@ -65,7 +68,11 @@ public class JavacTransformer {
java.util.List<JavacAST> asts = new ArrayList<JavacAST>();
- for (JCCompilationUnit unit : compilationUnits) asts.add(new JavacAST(messager, context, unit));
+ for (JCCompilationUnit unit : compilationUnits) {
+ if (!Boolean.TRUE.equals(LombokConfiguration.read(ConfigurationKeys.LOMBOK_DISABLE, JavacAST.getAbsoluteFileLocation(unit)))) {
+ asts.add(new JavacAST(messager, context, unit));
+ }
+ }
for (JavacAST ast : asts) {
ast.traverse(new AnnotationVisitor(priority));