JavaTM 2 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 2 Platform
Standard Ed. 6

提交錯誤或意見

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