JavaTM Platform
Standard Ed. 6

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

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

javax.annotation.processing 中 AnnotationValue 的使用
 

参数类型为 AnnotationValue 的 javax.annotation.processing 中的方法
 void Messager.printMessage(Diagnostic.Kind kind, CharSequence msg, Element e, AnnotationMirror a, AnnotationValue v)
          在已注释元素的注释镜像内部注释值的位置上打印指定种类的消息。
 

javax.lang.model.element 中 AnnotationValue 的使用
 

返回 AnnotationValue 的 javax.lang.model.element 中的方法
 AnnotationValue ExecutableElement.getDefaultValue()
          如果此 executable 是一个注释类型元素,则返回默认值。
 AnnotationValue UnknownAnnotationValueException.getUnknownAnnotationValue()
          返回未知注释值。
 

返回变量类型为 AnnotationValue 的类型的 javax.lang.model.element 中的方法
 Map<? extends ExecutableElement,? extends AnnotationValue> AnnotationMirror.getElementValues()
          返回此注释元素的值。
 

参数类型为 AnnotationValue 的 javax.lang.model.element 中的方法
 R AnnotationValueVisitor.visit(AnnotationValue av)
          等效于 v.visit(av, null) 的便捷方法。
 R AnnotationValueVisitor.visit(AnnotationValue av, P p)
          访问注释值。
 R AnnotationValueVisitor.visitUnknown(AnnotationValue av, P p)
          访问未知种类的注释值。
 

类型变量类型为 AnnotationValue 的 javax.lang.model.element 中的方法参数
 R AnnotationValueVisitor.visitArray(List<? extends AnnotationValue> vals, P p)
          访问注释中的 array 值。
 

参数类型为 AnnotationValue 的 javax.lang.model.element 中的构造方法
UnknownAnnotationValueException(AnnotationValue av, Object p)
          创建一个新的 UnknownAnnotationValueException。
 

javax.lang.model.util 中 AnnotationValue 的使用
 

返回变量类型为 AnnotationValue 的类型的 javax.lang.model.util 中的方法
 Map<? extends ExecutableElement,? extends AnnotationValue> Elements.getElementValuesWithDefaults(AnnotationMirror a)
          返回注释元素的值,包括默认值。
 

参数类型为 AnnotationValue 的 javax.lang.model.util 中的方法
 R AbstractAnnotationValueVisitor6.visit(AnnotationValue av)
          访问注释值,这与将自身传递给该值的 accept 方法,并为附加参数传递 null 一样。
 R AbstractAnnotationValueVisitor6.visit(AnnotationValue av, P p)
          访问注释值,这与将自身传递给该值的 accept 方法一样。
 R AbstractAnnotationValueVisitor6.visitUnknown(AnnotationValue av, P p)
          访问未知种类的注释值。
 

类型变量类型为 AnnotationValue 的 javax.lang.model.util 中的方法参数
 R SimpleAnnotationValueVisitor6.visitArray(List<? extends AnnotationValue> vals, P p)
          访问注释中的 array 值。
 


JavaTM Platform
Standard Ed. 6

提交错误或意见
有关更多的 API 参考资料和开发人员文档,请参阅 Java SE 开发人员文档。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。