站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.0.0

SourceLevelQueryImplementation (NetBeans Java Support APIs) - NetBeans API Javadoc 5.0.0

 

org.netbeans.spi.java.queries
Interface SourceLevelQueryImplementation


public interface SourceLevelQueryImplementation

Permits providers to return specification source level of Java source file.

A default implementation is registered by the org.netbeans.modules.java.project module which looks up the project corresponding to the file (if any) and checks whether that project has an implementation of this interface in its lookup. If so, it delegates to that implementation. Therefore it is not generally necessary for a project type provider to register its own global implementation of this query, if it depends on the Java Project module and uses this style.

Since:
org.netbeans.api.java/1 1.5
See Also:
SourceLevelQuery, FileOwnerQuery, Project, ClassPath.BOOT

Method Summary
 String getSourceLevel(FileObject javaFile)
          Returns source level of the given Java file.
 

Method Detail

getSourceLevel

public String getSourceLevel(FileObject javaFile)
Returns source level of the given Java file. For acceptable return values see the documentation of -source command line switch of javac compiler .

Parameters:
javaFile - Java source file in question
Returns:
source level of the Java file, e.g. "1.3", "1.4" or "1.5", or null if it is not known

 

Built on May 3 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.