diff options
Diffstat (limited to 'src/core/lombok/javac')
-rw-r--r-- | src/core/lombok/javac/apt/Processor.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/lombok/javac/apt/Processor.java b/src/core/lombok/javac/apt/Processor.java index 99170be1..955cb3d0 100644 --- a/src/core/lombok/javac/apt/Processor.java +++ b/src/core/lombok/javac/apt/Processor.java @@ -37,6 +37,8 @@ import javax.annotation.processing.AbstractProcessor; import javax.annotation.processing.Messager; import javax.annotation.processing.ProcessingEnvironment; import javax.annotation.processing.RoundEnvironment; +import javax.annotation.processing.SupportedAnnotationTypes; +import javax.lang.model.SourceVersion; import javax.lang.model.element.Element; import javax.lang.model.element.TypeElement; import javax.tools.Diagnostic.Kind; @@ -64,6 +66,7 @@ import com.sun.tools.javac.util.Context; * To actually enable lombok in a javac compilation run, this class should be in the classpath when * running javac; that's the only requirement. */ +@SupportedAnnotationTypes("*") public class Processor extends AbstractProcessor { private JavacProcessingEnvironment processingEnv; @@ -248,4 +251,11 @@ public class Processor extends AbstractProcessor { return (JCCompilationUnit) path.getCompilationUnit(); } + + /** + * We just return the latest version of whatever JDK we run on. Stupid? Yeah, but it's either that or warnings on all versions but 1. + */ + @Override public SourceVersion getSupportedSourceVersion() { + return SourceVersion.values()[SourceVersion.values().length - 1]; + } } |