langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacMessager.java
changeset 26266 2d24bda701dc
parent 25874 83c19f00452c
child 28455 41245007c074
equal deleted inserted replaced
26265:46aacfffd3b5 26266:2d24bda701dc
    25 
    25 
    26 package com.sun.tools.javac.processing;
    26 package com.sun.tools.javac.processing;
    27 
    27 
    28 import com.sun.tools.javac.model.JavacElements;
    28 import com.sun.tools.javac.model.JavacElements;
    29 import com.sun.tools.javac.util.*;
    29 import com.sun.tools.javac.util.*;
       
    30 import com.sun.tools.javac.util.DefinedBy.Api;
    30 import com.sun.tools.javac.tree.JCTree;
    31 import com.sun.tools.javac.tree.JCTree;
    31 import com.sun.tools.javac.tree.JCTree.*;
    32 import com.sun.tools.javac.tree.JCTree.*;
    32 import javax.lang.model.element.*;
    33 import javax.lang.model.element.*;
    33 import javax.tools.JavaFileObject;
    34 import javax.tools.JavaFileObject;
    34 import javax.tools.Diagnostic;
    35 import javax.tools.Diagnostic;
    53         this.processingEnv = processingEnv;
    54         this.processingEnv = processingEnv;
    54     }
    55     }
    55 
    56 
    56     // processingEnv.getElementUtils()
    57     // processingEnv.getElementUtils()
    57 
    58 
       
    59     @DefinedBy(Api.ANNOTATION_PROCESSING)
    58     public void printMessage(Diagnostic.Kind kind, CharSequence msg) {
    60     public void printMessage(Diagnostic.Kind kind, CharSequence msg) {
    59         printMessage(kind, msg, null, null, null);
    61         printMessage(kind, msg, null, null, null);
    60     }
    62     }
    61 
    63 
       
    64     @DefinedBy(Api.ANNOTATION_PROCESSING)
    62     public void printMessage(Diagnostic.Kind kind, CharSequence msg,
    65     public void printMessage(Diagnostic.Kind kind, CharSequence msg,
    63                       Element e) {
    66                       Element e) {
    64         printMessage(kind, msg, e, null, null);
    67         printMessage(kind, msg, e, null, null);
    65     }
    68     }
    66 
    69 
    71      * @param kind the kind of message
    74      * @param kind the kind of message
    72      * @param msg  the message, or an empty string if none
    75      * @param msg  the message, or an empty string if none
    73      * @param e    the annotated element
    76      * @param e    the annotated element
    74      * @param a    the annotation to use as a position hint
    77      * @param a    the annotation to use as a position hint
    75      */
    78      */
       
    79     @DefinedBy(Api.ANNOTATION_PROCESSING)
    76     public void printMessage(Diagnostic.Kind kind, CharSequence msg,
    80     public void printMessage(Diagnostic.Kind kind, CharSequence msg,
    77                       Element e, AnnotationMirror a) {
    81                       Element e, AnnotationMirror a) {
    78         printMessage(kind, msg, e, a, null);
    82         printMessage(kind, msg, e, a, null);
    79     }
    83     }
    80 
    84 
    87      * @param msg  the message, or an empty string if none
    91      * @param msg  the message, or an empty string if none
    88      * @param e    the annotated element
    92      * @param e    the annotated element
    89      * @param a    the annotation containing the annotaiton value
    93      * @param a    the annotation containing the annotaiton value
    90      * @param v    the annotation value to use as a position hint
    94      * @param v    the annotation value to use as a position hint
    91      */
    95      */
       
    96     @DefinedBy(Api.ANNOTATION_PROCESSING)
    92     public void printMessage(Diagnostic.Kind kind, CharSequence msg,
    97     public void printMessage(Diagnostic.Kind kind, CharSequence msg,
    93                       Element e, AnnotationMirror a, AnnotationValue v) {
    98                       Element e, AnnotationMirror a, AnnotationValue v) {
    94         JavaFileObject oldSource = null;
    99         JavaFileObject oldSource = null;
    95         JavaFileObject newSource = null;
   100         JavaFileObject newSource = null;
    96         JCDiagnostic.DiagnosticPosition pos = null;
   101         JCDiagnostic.DiagnosticPosition pos = null;