public class ClassLocatorFactory
extends java.lang.Object
ClassLocatorFactory
is a factory for fetching
BaseClassLocator
instances. It provides a cache for
these instances to allow sharing between clients. Constructor and Description |
---|
ClassLocatorFactory() |
Modifier and Type | Method and Description |
---|---|
BaseClassLocator |
getClassLocator(java.net.URL rootURL)
Fetch a
BaseClassLocator instance for the given root URL
path, for Java class files. |
BaseClassLocator |
getClassLocator(URLPath urlPath)
Fetch a
BaseClassLocator instance for the given
URLPath for locating class files. |
BaseClassLocator |
getClassLocatorInterruptibly(URLPath urlPath)
Fetch a
BaseClassLocator instance for the given
URLPath for locating class files. |
static ClassLocatorFactory |
getInstance()
Gets the ClassLocatorFactory instance to use for this session.
|
BaseClassLocator |
getPathLocator(URLPath sourcePath,
URLPath classPath)
Fetch a
BaseClassLocator instance for the given source
and class paths for locating source and class files. |
BaseClassLocator |
getPathLocatorInterruptibly(URLPath sourcePath,
URLPath classPath)
Fetch a
BaseClassLocator instance for the given source
and class paths for locating source and class files. |
BaseClassLocator |
getSourceLocator(java.net.URL rootURL)
Fetch a
BaseClassLocator instance for the given root URL
path, for Java source files. |
BaseClassLocator |
getSourceLocator(URLPath urlPath)
Fetch a
BaseClassLocator instance for the given
URLPath for locating source files. |
BaseClassLocator |
getSourceLocatorInterruptibly(URLPath urlPath)
Fetch a
BaseClassLocator instance for the given
URLPath for locating source files. |
public static ClassLocatorFactory getInstance()
public BaseClassLocator getSourceLocator(java.net.URL rootURL)
BaseClassLocator
instance for the given root URL
path, for Java source files. Returns null if the URL is null.rootURL
- the root URL for the class locatorpublic BaseClassLocator getClassLocator(java.net.URL rootURL)
BaseClassLocator
instance for the given root URL
path, for Java class files. Returns null if the URL is null.
URL and file type.rootURL
- the root URL for the class locatorpublic BaseClassLocator getSourceLocator(URLPath urlPath)
BaseClassLocator
instance for the given
URLPath for locating source files. This does not currently track
changes to the URLPath. Returns null if the URLPath is
null.urlPath
- the URLPath to create a class locator forpublic BaseClassLocator getSourceLocatorInterruptibly(URLPath urlPath) throws java.lang.InterruptedException
BaseClassLocator
instance for the given
URLPath for locating source files. This does not currently track
changes to the URLPath. Returns null if the URLPath is
null.urlPath
- the URLPath to create a class locator forjava.lang.InterruptedException
- if the calling thread is interrupted during
creation of the locatorpublic BaseClassLocator getClassLocator(URLPath urlPath)
BaseClassLocator
instance for the given
URLPath for locating class files. This does not currently track
changes to the URLPath. Returns null if the URLPath is null.urlPath
- the URLPath to create a class locator forpublic BaseClassLocator getClassLocatorInterruptibly(URLPath urlPath) throws java.lang.InterruptedException
BaseClassLocator
instance for the given
URLPath for locating class files. This does not currently track
changes to the URLPath. Returns null if the URLPath is null.urlPath
- the URLPath to create a class locator forjava.lang.InterruptedException
- if the calling thread is interrupted during
creation of the locatorpublic BaseClassLocator getPathLocator(URLPath sourcePath, URLPath classPath)
BaseClassLocator
instance for the given source
and class paths for locating source and class files. This does not
currently track changes to the URLPaths provided. Returns null if
both specified paths are null.public BaseClassLocator getPathLocatorInterruptibly(URLPath sourcePath, URLPath classPath) throws java.lang.InterruptedException
BaseClassLocator
instance for the given source
and class paths for locating source and class files. This does not
currently track changes to the URLPaths provided. Returns null if
both specified paths are null.java.lang.InterruptedException