diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2010-08-15 22:59:49 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2010-08-15 22:59:49 +0200 |
commit | 240473a6c214679362bb3544ea414716f4c2062a (patch) | |
tree | e06ebd0e412cd8454ad1649d94c5e0919c4fa76e /src/core/lombok/javac/apt/MessagerDiagnosticsReceiver.java | |
parent | 81cfc844b90d347c01ec9e68dcd7554a75caa733 (diff) | |
parent | 4c23804837e854c4f4ebb0008b10241467550d3f (diff) | |
download | lombok-240473a6c214679362bb3544ea414716f4c2062a.tar.gz lombok-240473a6c214679362bb3544ea414716f4c2062a.tar.bz2 lombok-240473a6c214679362bb3544ea414716f4c2062a.zip |
Merge branch 'postProcess'
Diffstat (limited to 'src/core/lombok/javac/apt/MessagerDiagnosticsReceiver.java')
-rw-r--r-- | src/core/lombok/javac/apt/MessagerDiagnosticsReceiver.java | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/core/lombok/javac/apt/MessagerDiagnosticsReceiver.java b/src/core/lombok/javac/apt/MessagerDiagnosticsReceiver.java new file mode 100644 index 00000000..5b75b3c5 --- /dev/null +++ b/src/core/lombok/javac/apt/MessagerDiagnosticsReceiver.java @@ -0,0 +1,43 @@ +/* + * Copyright © 2009-2010 Reinier Zwitserloot and Roel Spilker. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package lombok.javac.apt; + +import javax.annotation.processing.Messager; +import javax.tools.Diagnostic.Kind; + +import lombok.core.DiagnosticsReceiver; + +public class MessagerDiagnosticsReceiver implements DiagnosticsReceiver { + private final Messager messager; + + public MessagerDiagnosticsReceiver(Messager messager) { + this.messager = messager; + } + + @Override public void addWarning(String message) { + messager.printMessage(Kind.WARNING, message); + } + + @Override public void addError(String message) { + messager.printMessage(Kind.ERROR, message); + } +}
\ No newline at end of file |