JavaTM 2 Platform
Standard Ed. 6

接口 javax.lang.model.element.AnnotationMirror
的使用

使用 AnnotationMirror 的软件包
javax.annotation.processing 用来声明注释处理器并允许注释处理器与注释处理工具环境通信的工具。 
javax.lang.model.element 用于 Java 编程语言的模型元素的接口。 
javax.lang.model.util 用来帮助处理程序元素类型的实用工具。 
 

javax.annotation.processingAnnotationMirror 的使用
 

参数类型为 AnnotationMirrorjavax.annotation.processing 中的方法
 Iterable<? extends Completion> AbstractProcessor.getCompletions(Element element, AnnotationMirror annotation, ExecutableElement member, String userText)
          返回一个空的 completion 迭代。
 Iterable<? extends Completion> Processor.getCompletions(Element element, AnnotationMirror annotation, ExecutableElement member, String userText)
          向工具框架返回某一注释的建议 completion 迭代。
 void Messager.printMessage(Diagnostic.Kind kind, CharSequence msg, Element e, AnnotationMirror a)
          在已注释元素的注释镜像位置上打印指定种类的消息。
 void Messager.printMessage(Diagnostic.Kind kind, CharSequence msg, Element e, AnnotationMirror a, AnnotationValue v)
          在已注释元素的注释镜像内部注释值的位置上打印指定种类的消息。
 

javax.lang.model.elementAnnotationMirror 的使用
 

返回变量类型为 AnnotationMirror 的类型的 javax.lang.model.element 中的方法
 List<? extends AnnotationMirror> Element.getAnnotationMirrors()
          返回直接存在于此元素上的注释。
 

参数类型为 AnnotationMirrorjavax.lang.model.element 中的方法
 R AnnotationValueVisitor.visitAnnotation(AnnotationMirror a, P p)
          访问注释中的 annotation 值。
 

javax.lang.model.utilAnnotationMirror 的使用
 

返回变量类型为 AnnotationMirror 的类型的 javax.lang.model.util 中的方法
 List<? extends AnnotationMirror> Elements.getAllAnnotationMirrors(Element e)
          返回元素的所有注释,不管是继承的还是直接存在的。
 

参数类型为 AnnotationMirrorjavax.lang.model.util 中的方法
 Map<? extends ExecutableElement,? extends AnnotationValue> Elements.getElementValuesWithDefaults(AnnotationMirror a)
          返回注释元素的值,包括默认值。
 R SimpleAnnotationValueVisitor6.visitAnnotation(AnnotationMirror a, P p)
          访问注释中的 annotation 值。
 


JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only