当前页面:
在线文档首页 >
NetBeans API Javadoc 4.1.0
SourceLevelQuery (NetBeans Java Support APIs) - NetBeans API Javadoc 4.1.0
org.netbeans.api.java.queries
Class SourceLevelQuery
java.lang.Object
org.netbeans.api.java.queries.SourceLevelQuery
- public class SourceLevelQuery
- extends Object
Returns source level of the given Java source file if it is known.
- Since:
- org.netbeans.api.java/1 1.5
- See Also:
SourceLevelQueryImplementation
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getSourceLevel
public static String getSourceLevel(FileObject javaFile)
- Returns source level of the given Java file, Java package or source folder. For acceptable return values
see the documentation of
-source
command line switch of
javac
compiler .
- Parameters:
javaFile
- Java source file, Java package or source folder 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