Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

oracle.jdeveloper.java
Interface JavaClassLocator2

All Superinterfaces:
JavaClassLocator
All Known Implementing Classes:
ArrayClassLocator, BaseClassLocator, CachedDirURLClassLocator, DebugClassLocator, DirURLClassLocator, JarURLClassLocator, JdevPathClassLocator, LibraryClassLocator, LocatorWrapper, PathClassLocator, ProjectClassLocator, URLClassLocator

public interface JavaClassLocator2
extends JavaClassLocator

Extends the JavaClassLocator interface to provide additional functionality. In particular, provides support for interruption.

Since:
11.1.2

Method Summary
 void buildIndexInterruptibly()
          Instructs this class locator to start building its index for locating files.
 java.util.Collection<java.lang.String> getAllClassesInterruptibly()
          Fetch all of the top-level classes that are known by this locator.
 java.util.Collection<java.lang.String> getAllClassesInterruptibly(ClassNameFilter filter)
          Fetch all of the top-level classes that are known by this locator that satisfies the given filter.
 java.util.Collection<java.lang.String> getAllPackagesInterruptibly()
          Fetch all of the full packges that are known by this locator.
 java.util.Collection<java.lang.String> getAllPackagesInterruptibly(PackageNameFilter filter)
          Fetch all of the packages that are known by this locator that satisfies the given filter.
 java.util.Collection<java.lang.String> getClassesByNameInterruptibly(java.lang.String name, boolean matchCase)
          Fetch all of the top-level classes that are known by this locator with the given class name.
 java.util.Collection<java.lang.String> getClassesByPrefixInterruptibly(java.lang.String prefix, boolean matchCase)
          Fetch all of the top-level classes that are known by this locator whose given class name starts with the specified prefix.
 java.util.Collection<java.lang.String> getClassesInPackageInterruptibly(java.lang.String packagePrefix)
          Fetch the top-level classes within the given package prefix.
 java.net.URL getClassURLInterruptibly(java.lang.String fqClassName)
          Fetch the URL for the JavaFile for the given fully-qualified Java class name.
 java.util.Collection<java.lang.String> getPackagesInterruptibly(java.lang.String packagePrefix)
          Fetch the list of subpackages within the given package.
 java.net.URL getSourceURLInterruptibly(java.lang.String fqClassName)
          Fetch the URL for the SourceFile for the given fully-qualified Java class name.
 java.net.URL getURLInterruptibly(java.lang.String fqClassName)
          Fetch the URL for the JavaFile for the given fully-qualified Java class name.
 
Methods inherited from interface oracle.jdeveloper.java.JavaClassLocator
buildIndex, getAllClasses, getAllClasses, getAllPackages, getAllPackages, getClassesByName, getClassesByPrefix, getClassesInPackage, getClassURL, getPackages, getSourceURL, getURL
 

Method Detail

buildIndexInterruptibly

void buildIndexInterruptibly()
                             throws java.lang.InterruptedException
Instructs this class locator to start building its index for locating files. This method runs on the current thread and blocks until the index build is completed. To build the index in the background, call this method on a background thread.

Throws:
java.lang.InterruptedException - if the build is interrupted

getPackagesInterruptibly

java.util.Collection<java.lang.String> getPackagesInterruptibly(java.lang.String packagePrefix)
                                                                throws java.lang.InterruptedException
Fetch the list of subpackages within the given package. To get a list of top-level packages, use an empty, "", prefix. The names of the subpackages will not contain the package prefix.

Parameters:
packagePrefix - the package prefix, i.e., "java.io"
Returns:
a collection of (String) subpackage names in the given package
Throws:
java.lang.InterruptedException - if the operation is interrupted

getClassesInPackageInterruptibly

java.util.Collection<java.lang.String> getClassesInPackageInterruptibly(java.lang.String packagePrefix)
                                                                        throws java.lang.InterruptedException
Fetch the top-level classes within the given package prefix. To get a list of top-level classes that don't have a package, use an empty, "", prefix. Note that this method does not return inner classes.

Parameters:
packagePrefix - the package prefix, i.e., "java.io"
Returns:
a collection of (String) class names (without the package prefix) in the given package
Throws:
java.lang.InterruptedException - if the operation is interrupted

getAllClassesInterruptibly

java.util.Collection<java.lang.String> getAllClassesInterruptibly()
                                                                  throws java.lang.InterruptedException
Fetch all of the top-level classes that are known by this locator. This will return fully-qualified class names, such as "java.util.List".

Returns:
a collection of (String) fully-qualified class names known by this locator
Throws:
java.lang.InterruptedException - if the operation is interrupted

getAllClassesInterruptibly

java.util.Collection<java.lang.String> getAllClassesInterruptibly(ClassNameFilter filter)
                                                                  throws java.lang.InterruptedException
Fetch all of the top-level classes that are known by this locator that satisfies the given filter. This will return fully-qualified class names, such as "java.util.List".

Parameters:
filter - the class name filter to use for the search
Returns:
a collection of (String) fully-qualified class names known by this locator, and filtered by the given name filter
Throws:
java.lang.InterruptedException - if the operation is interrupted

getAllPackagesInterruptibly

java.util.Collection<java.lang.String> getAllPackagesInterruptibly()
                                                                   throws java.lang.InterruptedException
Fetch all of the full packges that are known by this locator. This will return fully-qualified package names, such as "java.util" or "java.io". This collection will not include the top-level package "".

Returns:
a collection of (String) full package names known by this lcoator
Throws:
java.lang.InterruptedException - if the operation is interrupted

getAllPackagesInterruptibly

java.util.Collection<java.lang.String> getAllPackagesInterruptibly(PackageNameFilter filter)
                                                                   throws java.lang.InterruptedException
Fetch all of the packages that are known by this locator that satisfies the given filter. This will return full package names, such as "java.util", or "java.io". This collection will not include the top-level package "".

Parameters:
filter - the package name filter to use for the search
Returns:
a collection of (String) full package names that are known by this locator, and filtered by the given name filter
Throws:
java.lang.InterruptedException - if the operation is interrupted

getClassesByNameInterruptibly

java.util.Collection<java.lang.String> getClassesByNameInterruptibly(java.lang.String name,
                                                                     boolean matchCase)
                                                                     throws java.lang.InterruptedException
Fetch all of the top-level classes that are known by this locator with the given class name. For example, if "List" were specified for the name, this might return an array containing "java.awt.List" and "java.util.List".

Parameters:
name - the unqualified name of the top-level class to locate
matchCase - whether to use case-sensitivity for matching the class name
Returns:
a collection of (String) fully-qualified class names known by this locator with the given class name
Throws:
java.lang.InterruptedException - if the operation is interrupted

getClassesByPrefixInterruptibly

java.util.Collection<java.lang.String> getClassesByPrefixInterruptibly(java.lang.String prefix,
                                                                       boolean matchCase)
                                                                       throws java.lang.InterruptedException
Fetch all of the top-level classes that are known by this locator whose given class name starts with the specified prefix. For example, if "File" were specified for this name, this might return an array containing "java.io.File", "java.io.FileNotFoundException", and "java.io.FileInputStream", and so on.

Parameters:
prefix - the starting prefix of the class name to locate
matchCase - whether to use case-sensitivity for matching the class name
Returns:
a collection of (String) fully-qualified class names known by this locator with the given class name prefix
Throws:
java.lang.InterruptedException - if the operation is interrupted

getURLInterruptibly

java.net.URL getURLInterruptibly(java.lang.String fqClassName)
                                 throws java.lang.InterruptedException
Fetch the URL for the JavaFile for the given fully-qualified Java class name. The implementation may choose either a class URL or source URL. For example, an implementation may decide to return the URL that is more up-to-date, or an URL that would be faster to load. Note that if the given class is an inner class, this routine may return the URL for the Java source that contains the owning outer class.

Parameters:
fqClassName - the fully-qualified class name in dotted notation, i.e., java.util.List
Returns:
the URL for the JavaFile containing the given class
Throws:
java.lang.InterruptedException - if the operation is interrupted

getSourceURLInterruptibly

java.net.URL getSourceURLInterruptibly(java.lang.String fqClassName)
                                       throws java.lang.InterruptedException
Fetch the URL for the SourceFile for the given fully-qualified Java class name. This may return null if a source URL is not available for the given fully-qualified class name.

Parameters:
fqClassName - the fully-qualified class name in dotted notation
Throws:
java.lang.InterruptedException - if the operation is interrupted

getClassURLInterruptibly

java.net.URL getClassURLInterruptibly(java.lang.String fqClassName)
                                      throws java.lang.InterruptedException
Fetch the URL for the JavaFile for the given fully-qualified Java class name. This may return null if a given class URL is not available for the given fully-qualified class name.

Parameters:
fqClassName - the fully-qualified class name in dotted notation
Throws:
java.lang.InterruptedException - if the operation is interrupted

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

Copyright © 1997, 2011, Oracle. All rights reserved.