JavaTM 2 Platform
Standard Ed. 6

類別 javax.lang.model.SourceVersion
的使用

使用 SourceVersion 的軟體套件
javax.annotation.processing 用來宣告註釋處理器並允許註釋處理器與註釋處理工具環境通信的工具。 
javax.lang.model 用來為 Java 程式語言建立模型的套件的類別和層次結構。 
javax.tools 為能夠從程序(例如,編譯器)中調用的工具提供介面。 
 

javax.annotation.processing 中 SourceVersion 的使用
 

返回 SourceVersion 的 javax.annotation.processing 中的方法
 SourceVersion ProcessingEnvironment.getSourceVersion()
          返回任何產生的源和類別檔案應該符合的源版本。
 SourceVersion AbstractProcessor.getSupportedSourceVersion()
          如果 processor 類別是使用 SupportedSourceVersion 註釋的,則返回註釋中的源版本。
 SourceVersion Processor.getSupportedSourceVersion()
          返回此註釋 Processor 支持的最新的源版本。
 

javax.lang.model 中 SourceVersion 的使用
 

返回 SourceVersion 的 javax.lang.model 中的方法
static SourceVersion SourceVersion.latest()
          返回可以建模的最新源版本。
static SourceVersion SourceVersion.latestSupported()
          返回完全受當前執行環境支持的最新源版本。
static SourceVersion SourceVersion.valueOf(String name)
          返回帶有指定名稱的該型別的列舉常數。
static SourceVersion[] SourceVersion.values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 

javax.tools 中 SourceVersion 的使用
 

返回變數型別為 SourceVersion 的型別的 javax.tools 中的方法
 Set<SourceVersion> Tool.getSourceVersions()
          獲取此工具支持的 Java™ 程式語言的源版本。
 


JavaTM 2 Platform
Standard Ed. 6

提交錯誤或意見

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