diff options
author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2012-12-24 10:09:33 +0000 |
---|---|---|
committer | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2012-12-24 10:09:33 +0000 |
commit | 621cce7fdf0e325d8789dec762e448844ba0feae (patch) | |
tree | 6c5ec32304778620b936672f00ccff99249db79b /javax/annotation/processing/Messager.java | |
parent | 734a69f1a1ee868a6989d1580bfc1861e015e4c3 (diff) | |
download | classpath-621cce7fdf0e325d8789dec762e448844ba0feae.tar.gz |
Add methods to Messager now dependents are in place.
2012-12-19 Andrew John Hughes <gnu_andrew@member.fsf.org>
* javax/annotation/processing/Messager.java:
(printMessage(Kind,CharSequence)): Added.
(printMessage(Kind,CharSequence,Element)): Likewise.
(printMessage(Kind,CharSequence,Element,
AnnotationMirror)): Likewise.
(printMessage(Kind,CharSequence,Element,
AnnotationMirror,AnnotationValue)): Likewise.
Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
Diffstat (limited to 'javax/annotation/processing/Messager.java')
-rw-r--r-- | javax/annotation/processing/Messager.java | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/javax/annotation/processing/Messager.java b/javax/annotation/processing/Messager.java index b5366efeb..884b5b374 100644 --- a/javax/annotation/processing/Messager.java +++ b/javax/annotation/processing/Messager.java @@ -37,6 +37,12 @@ exception statement from your version. */ package javax.annotation.processing; +import javax.lang.model.element.AnnotationMirror; +import javax.lang.model.element.AnnotationValue; +import javax.lang.model.element.Element; + +import static javax.tools.Diagnostic.Kind; + /** * Provides a way for an annotation processor to report * messages to the user. Messages may use elements, @@ -54,4 +60,55 @@ package javax.annotation.processing; */ public interface Messager { + + /** + * Prints a message of the specified kind. + * + * @param kind the kind of message to print. + * @param message the message to print. + */ + void printMessage(Kind kind, CharSequence message); + + /** + * Prints a message of the specified kind at + * the location of the given element. + * + * @param kind the kind of message to print. + * @param message the message to print. + * @param element the element to use for positioning. + */ + void printMessage(Kind kind, CharSequence message, + Element element); + + /** + * Prints a message of the specified kind at the + * location of the annotation mirror of the given + * annotated element. + * + * @param kind the kind of message to print. + * @param message the message to print. + * @param element the annotated element. + * @param annotation the annotation to use for + * positioning. + */ + void printMessage(Kind kind, CharSequence message, + Element element, + AnnotationMirror annotation); + + /** + * Prints a message of the specified kind at the + * location of the annotation value inside the + * annotation mirror of the given annotated element. + * + * @param kind the kind of message to print. + * @param message the message to print. + * @param element the annotated element. + * @param annotation the annotation containing the value. + * @param value the annotation value to use for positioning. + */ + void printMessage(Kind kind, CharSequence message, + Element element, + AnnotationMirror annotation, + AnnotationValue value); + } |