org.netbeans.api.java/1 1.33.1

org.netbeans.spi.java.queries
Interface SourceLevelQueryImplementation2


public interface SourceLevelQueryImplementation2

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:
1.30
See Also:
SourceLevelQuery, FileOwnerQuery, org.netbeans.api.project.Project#getLookup, ClassPath.BOOT

Nested Class Summary
static interface SourceLevelQueryImplementation2.Result
          Result of finding source level, encapsulating the answer as well as the ability to listen to it.
 
Method Summary
 SourceLevelQueryImplementation2.Result getSourceLevel(FileObject javaFile)
          Returns source level of the given Java file.
 

Method Detail

getSourceLevel

SourceLevelQueryImplementation2.Result 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 encapsulated as SourceLevelQueryImplementation2.Result, or null if the file is not handled by this provider.

org.netbeans.api.java/1 1.33.1

Built on December 5 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.