public interface Messager 
      Messager提供注释处理器报告错误消息,警告和其他通知的方式。 
       可以传递元素,注释和注释值以提供消息的位置提示。 
       但是,这样的位置提示可能不可用或只是近似。 
       用error kind打印邮件将会raise an error 。
 请注意,通过此界面中的方法“打印”的消息可能显示为也可能不会显示为文本输出到某个位置,如System.out或System.err 。 实现可以选择以不同的方式呈现这些信息,例如窗口中的消息。 
ProcessingEnvironment.getLocale() 
       | Modifier and Type | Method and Description | 
|---|---|
| void | printMessage(Diagnostic.Kind kind, CharSequence msg)
              打印指定类型的消息。 
             | 
| void | printMessage(Diagnostic.Kind kind, CharSequence msg, Element e)
              在元素的位置打印指定类型的消息。 
             | 
| void | printMessage(Diagnostic.Kind kind, CharSequence msg, Element e, AnnotationMirror a)
              在注释元素的注释镜像的位置打印指定类型的消息。 
             | 
| void | printMessage(Diagnostic.Kind kind, CharSequence msg, Element e, AnnotationMirror a, AnnotationValue v)
              在注释元素的注释镜像内的注释值的位置打印指定类型的消息。 
             | 
void printMessage(Diagnostic.Kind kind, CharSequence msg)
kind - 那种消息 
           msg - 消息,如果没有,则为空字符串 
           void printMessage(Diagnostic.Kind kind, CharSequence msg, Element e)
kind - 那种消息 
           msg - 消息,或空字符串(如果没有) 
           e - 用作位置提示的元素 
           void printMessage(Diagnostic.Kind kind, CharSequence msg, Element e, AnnotationMirror a)
kind - 那种消息 
           msg - 消息,或空字符串(如果没有) 
           e - 注释元素 
           a - 用作位置提示的注释 
           void printMessage(Diagnostic.Kind kind, CharSequence msg, Element e, AnnotationMirror a, AnnotationValue v)
kind - 那种消息 
           msg - 消息,如果没有,则为空字符串 
           e - 注释元素 
           a - 包含注释值的注释 
           v - the annotation value to use as a position hint 
            Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.