mirror of
https://github.com/tiennm99/lombok.git
synced 2026-07-31 10:26:25 +00:00
#1117: add claiming annotation processor
This commit is contained in:
@@ -226,7 +226,8 @@ the common tasks and can be called on to run the main aspects of all the sub-scr
|
||||
</ivy:compile>
|
||||
<mkdir dir="build/lombok/META-INF" />
|
||||
<mkdir dir="build/lombok/META-INF/services" />
|
||||
<echo file="build/lombok/META-INF/services/javax.annotation.processing.Processor">lombok.launch.AnnotationProcessorHider$AnnotationProcessor</echo>
|
||||
<echo file="build/lombok/META-INF/services/javax.annotation.processing.Processor">lombok.launch.AnnotationProcessorHider$AnnotationProcessor
|
||||
lombok.launch.AnnotationProcessorHider$ClaimingProcessor</echo>
|
||||
</target>
|
||||
|
||||
<target name="dist" description="Builds THE lombok.jar file which contains everything." depends="version, compile">
|
||||
|
||||
@@ -3,6 +3,7 @@ Lombok Changelog
|
||||
|
||||
### v1.16.9 "Edgy Guinea Pig"
|
||||
* FEATURE: Added support for JBoss logger [Issue #1103](https://github.com/rzwitserloot/lombok/issues/1103)
|
||||
* ENHANCEMENT: Running `javac -Xlint:all` would generate a warning about unclaimed annotations [Issue #1117](https://github.com/rzwitserloot/lombok/issues/1117)
|
||||
|
||||
### v1.16.8 (March 7th, 2016)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2014 The Project Lombok Authors.
|
||||
* Copyright (C) 2014-2016 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
|
||||
@@ -27,6 +27,7 @@ import javax.annotation.processing.AbstractProcessor;
|
||||
import javax.annotation.processing.Completion;
|
||||
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.AnnotationMirror;
|
||||
import javax.lang.model.element.Element;
|
||||
@@ -74,4 +75,15 @@ class AnnotationProcessorHider {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SupportedAnnotationTypes("lombok.*")
|
||||
public static class ClaimingProcessor extends AbstractProcessor {
|
||||
@Override public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override public SourceVersion getSupportedSourceVersion() {
|
||||
return SourceVersion.latest();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user