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

BinaryForSourceQueryImplementation (Java Support APIs) - NetBeans API Javadoc (Current Development Version)

org.netbeans.api.java/1 1.13

org.netbeans.spi.java.queries
Interface BinaryForSourceQueryImplementation


public interface BinaryForSourceQueryImplementation

Information about where binaries (classfiles) corresponding to Java sources can be found, this is intended to be the inverse of the SourceForBinaryQueryImplementation.

Since:
org.netbeans.api.java/1 1.12
See Also:
BinaryForSourceQuery, SourceForBinaryQuery, SourceForBinaryQueryImplementation

Method Summary
 BinaryForSourceQuery.Result findBinaryRoots(URL sourceRoot)
          Returns the binary root(s) for a given source root.
 

Method Detail

findBinaryRoots

BinaryForSourceQuery.Result findBinaryRoots(URL sourceRoot)
Returns the binary root(s) for a given source root.

The returned BinaryForSourceQuery.Result must be a singleton. It means that for repeated calling of this method with the same recognized root the method has to return the same instance of BinaryForSourceQuery.Result.
The typical implemantation of the findBinaryRoots contains 3 steps:

  1. Look into the cache if there is already a result for the root, if so return it
  2. Check if the sourceRoot is recognized, if not return null
  3. Create a new BinaryForSourceQuery.Result for the sourceRoot, put it into the cache and return it.

Any absolute URL may be used but typically it will use the file protocol for directory entries and jar protocol for JAR entries (e.g. jar:file:/tmp/foo.jar!/).

Parameters:
sourceRoot - the source path root
Returns:
a result object encapsulating the answer or null if the sourceRoot is not recognized

org.netbeans.api.java/1 1.13

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