| java.lang.Object com.google.gwt.dev.util.FileOracleFactory
FileOracleFactory | public class FileOracleFactory (Code) | | Creates a FileOracle based on a set of logical packages combined with either
a URLClassLoader. For each specified package, the ClassLoader is searched for
instances of that package as a directory. The results of this operation are
merged together into a single list of URLs whose order is determined by the
order of URLs in the ClassLoader. The relative order of different logical
packages originating from the same URL in the ClassLoader is undefined.
Once the sorted list of URLs is resolved, each URL is recursively searched to
index all of its files (optionally, that pass the given FileOracleFilter).
The results of this indexing are used to create the output FileOracle. Once
the FileOracle is created, its index is fixed and no longer depends on the
underlying URLClassLoader or file system. However, URLs returned from the
FileOracle may become invalid if the contents of the file system change.
Presently, only URLs beginning with file: and
jar:file: can be inspected to index children. Any other types
of URLs will generate a warning. The set of children indexed by
jar:file: type URLs is fixed at creation time, but the set of
children from file: type URLs will dynamically query the
underlying file system.
|
Inner Class :public interface FileFilter | |
Method Summary | |
public void | addPackage(String packageAsPath, FileFilter filter) Adds a logical package to the product FileOracle. | public void | addRootPackage(String packageAsPath, FileFilter filter) Adds a logical root package to the product FileOracle. | public FileOracle | create(TreeLogger logger) Creates the product FileOracle based on the logical packages previously
added.
Parameters: logger - Logs the process. |
FileOracleFactory | public FileOracleFactory()(Code) | | Creates a FileOracleFactory with the default URLClassLoader.
|
FileOracleFactory | public FileOracleFactory(URLClassLoader classLoader)(Code) | | Creates a FileOracleFactory.
Parameters: classLoader - The underlying class path to use. |
addPackage | public void addPackage(String packageAsPath, FileFilter filter)(Code) | | Adds a logical package to the product FileOracle. All instances of this
package that can be found in the underlying URLClassLoader will have their
their children indexed, relative to the class path entry on which they are
found.
Parameters: packageAsPath - For example, "com/google/gwt/core/client". |
addRootPackage | public void addRootPackage(String packageAsPath, FileFilter filter)(Code) | | Adds a logical root package to the product FileOracle. All instances of
this package that can be found in the underlying URLClassLoader will have
their their children indexed, relative to their location within
packageAsPath. All root packages trump all non-root packages when
determining the final precedence order.
Parameters: packageAsPath - For example, "com/google/gwt/core/client". |
create | public FileOracle create(TreeLogger logger)(Code) | | Creates the product FileOracle based on the logical packages previously
added.
Parameters: logger - Logs the process. a new FileOracle. |
|
|