org.netbeans.modules.parsing.api/1 1.55.0 6

org.netbeans.modules.parsing.spi.indexing.support
Class QuerySupport

java.lang.Object
  extended by org.netbeans.modules.parsing.spi.indexing.support.QuerySupport

public final class QuerySupport
extends Object


Nested Class Summary
static class QuerySupport.Kind
          Encodes a type of the name kind used by query(java.lang.String, java.lang.String, org.netbeans.modules.parsing.spi.indexing.support.QuerySupport.Kind, java.lang.String...).
 
Method Summary
static Collection<FileObject> findRoots(FileObject f, Collection<String> sourcePathIds, Collection<String> libraryPathIds, Collection<String> binaryLibraryPathIds)
          Gets classpath roots relevant for a file.
static Collection<FileObject> findRoots(Project project, Collection<String> sourcePathIds, Collection<String> libraryPathIds, Collection<String> binaryLibraryPathIds)
          Gets classpath roots relevant for a project.
static QuerySupport forRoots(String indexerName, int indexerVersion, FileObject... roots)
           
static QuerySupport forRoots(String indexerName, int indexerVersion, URL... roots)
           
 Collection<? extends IndexResult> query(String fieldName, String fieldValue, QuerySupport.Kind kind, String... fieldsToLoad)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findRoots

public static Collection<FileObject> findRoots(FileObject f,
                                               Collection<String> sourcePathIds,
                                               Collection<String> libraryPathIds,
                                               Collection<String> binaryLibraryPathIds)
Gets classpath roots relevant for a file. This method tries to find classpath roots for a given files. It looks at classpaths specified by sourcePathIds, libraryPathIds and binaryLibraryPathIds parameters.

The roots collected from binaryLibraryPathIds will be translated by the SourceForBinaryQuery in order to find relevant sources root. The roots collected from libraryPathIds are expected to be libraries in their sources form (ie. no translation).

Parameters:
f - The file to find roots for.
sourcePathIds - The IDs of source classpath to look at.
libraryPathIds - The IDs of library classpath to look at.
binaryLibraryPathIds - The IDs of binary library classpath to look at.
Returns:
The collection of roots for a given file. It may be empty, but never null.
Since:
1.6

findRoots

public static Collection<FileObject> findRoots(Project project,
                                               Collection<String> sourcePathIds,
                                               Collection<String> libraryPathIds,
                                               Collection<String> binaryLibraryPathIds)
Gets classpath roots relevant for a project. This method tries to find classpaths with sourcePathIds, libraryPathIds and binaryPathIds supplied by the project.

The roots collected from binaryLibraryPathIds will be translated by the SourceForBinaryQuery in order to find relevant sources root. The roots collected from libraryPathIds are expected to be libraries in their sources form (ie. no translation).

Parameters:
project - The project to find the roots for. Can be null in which case the method searches in all registered classpaths.
sourcePathIds - The IDs of source classpath to look at.
libraryPathIds - The IDs of library classpath to look at.
binaryLibraryPathIds - The IDs of binary library classpath to look at.
Returns:
The collection of roots for a given project. It may be empty, but never null.
Since:
1.6

forRoots

public static QuerySupport forRoots(String indexerName,
                                    int indexerVersion,
                                    URL... roots)
                             throws IOException
Throws:
IOException

forRoots

public static QuerySupport forRoots(String indexerName,
                                    int indexerVersion,
                                    FileObject... roots)
                             throws IOException
Throws:
IOException

query

public Collection<? extends IndexResult> query(String fieldName,
                                               String fieldValue,
                                               QuerySupport.Kind kind,
                                               String... fieldsToLoad)
                                        throws IOException
Throws:
IOException

org.netbeans.modules.parsing.api/1 1.55.0 6

Built on May 24 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.