| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final JavaFileManager | |
| private final JavaFileManager |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements javax. Releases any resources opened by this file manager directly or indirectly. |
| public boolean | contains(JavaFileManager.
Overrides default javax. Determines whether or not a given file object is "contained in" a specified location. |
| private JavaFileManager | |
| public void | flush()
Implements javax. Flushes any resources opened for output by this file manager directly or indirectly. |
| public JavaFileManager | |
| public ClassLoader | getClassLoader(JavaFileManager.
Implements javax. Returns a class loader for loading plug-ins from the given package-oriented location. |
| public FileObject | getFileForInput(JavaFileManager.
Implements javax. Returns a file object for input representing the specified relative name in the specified package in the given package-oriented location. |
| public FileObject | getFileForOutput(JavaFileManager.
Implements javax. Returns a file object for output representing the specified relative name in the specified package in the given location. |
| public FileObject | getFileForOutputForOriginatingFiles(JavaFileManager.
Overrides default javax. Returns a file object for output representing the specified relative name in the specified package in the given location. |
| public JavaFileObject | getJavaFileForInput(JavaFileManager.
Implements javax. Returns a file object for input representing the specified class of the specified kind in the given package-oriented location. |
| public JavaFileObject | getJavaFileForOutput(JavaFileManager.
Implements javax. Returns a file object for output representing the specified class of the specified kind in the given package-oriented location. |
| public JavaFileObject | getJavaFileForOutputForOriginatingFiles(JavaFileManager.
Overrides default javax. Returns a file object for output representing the specified class of the specified kind in the given package-oriented location. |
| public JavaFileManager. | getLocationForModule(JavaFileManager.
Overrides default javax. Gets a location for a named module within a location, which may be either a module-oriented location or an output location. |
| public JavaFileManager. | getLocationForModule(JavaFileManager.
Overrides default javax. Gets a location for the module containing a specific file to be found within a location, which may be either a module-oriented location or an output location. |
| public <S> ServiceLoader | getServiceLoader(JavaFileManager.
Overrides default javax. Get a service loader for a specific service class from a given location. |
| public boolean | handleOption(String current, Iterator<String> remaining)
Implements javax. Handles one option. |
| public boolean | hasLocation(JavaFileManager.
Implements javax. Determines if a location is known to this file manager. |
| public String | inferBinaryName(JavaFileManager.
Implements javax. Infers a binary name of a file object based on a package-oriented location. |
| public String | inferModuleName(JavaFileManager.
Overrides default javax. Infer the name of the module from its location, as returned by
|
| public static void | |
| public boolean | isSameFile(FileObject a, FileObject b)
Implements javax. Compares two file objects and returns true if they represent the same underlying object. |
| public int | isSupportedOption(String option)
Implements javax. Determines if the given option is supported and if so, the number of arguments the option takes. |
| public Iterable | list(JavaFileManager.
Implements javax. Lists all file objects matching the given criteria in the given package-oriented location. |
| public Iterable | listLocationsForModules(JavaFileManager.
Overrides default javax. Lists the locations for all the modules in a module-oriented location or an output location. |
| baseFM | back to summary |
|---|---|
| private final JavaFileManager baseFM | |
| releaseFM | back to summary |
|---|---|
| private final JavaFileManager releaseFM | |
| DelegatingJavaFileManager | back to summary |
|---|---|
| private DelegatingJavaFileManager(JavaFileManager releaseFM, JavaFileManager baseFM) | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements javax. Doc from javax. Releases any resources opened by this file manager directly or indirectly. This might render this file manager useless and the effect of subsequent calls to methods on this object or any objects obtained through this object is undefined unless explicitly allowed. However, closing a file manager which has already been closed has no effect.
| |
| contains | back to summary |
|---|---|
| public boolean contains(JavaFileManager. Overrides default javax. Doc from javax. Determines whether or not a given file object is "contained in" a specified location. For a package-oriented location, a file object is contained in the location if there exist
values for packageName and relativeName such that either of the following
calls would return the getFileForInput(location, packageName, relativeName) getFileForOutput(location, packageName, relativeName, null) For a module-oriented location, a file object is contained in the location if there exists a module that may be obtained by the call: getLocationForModule(location, moduleName)
| |
| delegate | back to summary |
|---|---|
| private JavaFileManager delegate(JavaFileManager. | |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Implements javax. Doc from javax. Flushes any resources opened for output by this file manager directly or indirectly. Flushing a closed file manager has no effect.
| |
| getBaseFileManager | back to summary |
|---|---|
| public JavaFileManager getBaseFileManager() | |
| getClassLoader | back to summary |
|---|---|
| public ClassLoader getClassLoader(JavaFileManager. Implements javax. Doc from javax. Returns a class loader for loading plug-ins from the given
package-oriented location.
For example, to load annotation processors,
a compiler will request a class loader for the
| |
| getFileForInput | back to summary |
|---|---|
| public FileObject getFileForInput(JavaFileManager. Implements javax. Doc from javax. Returns a file object for input representing the specified relative name in the specified package in the given package-oriented location. If the returned object represents a source or class file, it must be an instance
of Informally, the file object returned by this method is located in the concatenation of the location, package name, and relative name. For example, to locate the properties file "resources/compiler.properties" in the package "com.sun.tools.javac" in the SOURCE_PATH location, this method might be called like so: getFileForInput(SOURCE_PATH, "com.sun.tools.javac", "resources/compiler.properties"); If the call was executed on Windows, with SOURCE_PATH set to
| |
| getFileForOutput | back to summary |
|---|---|
| public FileObject getFileForOutput(JavaFileManager. Implements javax. Doc from javax. Returns a file object for output representing the specified relative name in the specified package in the given location. Optionally, this file manager might consider the sibling as a hint for where to place the output. The exact semantics of this hint is unspecified. The JDK compiler, javac, for example, will place class files in the same directories as originating source files unless a class file output directory is provided. To facilitate this behavior, javac might provide the originating source file as sibling when calling this method. If the returned object represents a source or class file, it must be an instance
of Informally, the file object returned by this method is
located in the concatenation of the location, package name, and
relative name or next to the sibling argument. See
| |
| getFileForOutputForOriginatingFiles | back to summary |
|---|---|
| public FileObject getFileForOutputForOriginatingFiles(JavaFileManager. Overrides default javax. Doc from javax. Returns a file object for output representing the specified relative name in the specified package in the given location. The provided If the returned object represents a source or class file, it must be an instance
of Informally, the file object returned by this method is
located in the concatenation of the location, package name, and
relative name or in a location inferred from the
| |
| getJavaFileForInput | back to summary |
|---|---|
| public JavaFileObject getJavaFileForInput(JavaFileManager. Implements javax. Doc from javax. Returns a file object for input representing the specified class of the specified kind in the given package-oriented location.
| |
| getJavaFileForOutput | back to summary |
|---|---|
| public JavaFileObject getJavaFileForOutput(JavaFileManager. Implements javax. Doc from javax. Returns a file object for output representing the specified class of the specified kind in the given package-oriented location. Optionally, this file manager might consider the sibling as a hint for where to place the output. The exact semantics of this hint is unspecified. The JDK compiler, javac, for example, will place class files in the same directories as originating source files unless a class file output directory is provided. To facilitate this behavior, javac might provide the originating source file as sibling when calling this method.
| |
| getJavaFileForOutputForOriginatingFiles | back to summary |
|---|---|
| public JavaFileObject getJavaFileForOutputForOriginatingFiles(JavaFileManager. Overrides default javax. Doc from javax. Returns a file object for output representing the specified class of the specified kind in the given package-oriented location. The provided
| |
| getLocationForModule | back to summary |
|---|---|
| public JavaFileManager. Overrides default javax. Doc from javax. Gets a location for a named module within a location, which may be either a module-oriented location or an output location. The result will be an output location if the given location is an output location, or it will be a package-oriented location.
| |
| getLocationForModule | back to summary |
|---|---|
| public JavaFileManager. Overrides default javax. Doc from javax. Gets a location for the module containing a specific file to be found within a location, which may be either a module-oriented location or an output location. The result will be an output location if the given location is an output location, or it will be a package-oriented location.
| |
| getServiceLoader | back to summary |
|---|---|
| public <S> ServiceLoader Overrides default javax. Doc from javax. Get a service loader for a specific service class from a given location.
If the location is a module-oriented location, the service loader will use the
service declarations in the modules found in that location. Otherwise, a service loader
is created using the package-oriented location, in which case, the services are
determined using the provider-configuration files in
| |
| handleOption | back to summary |
|---|---|
| public boolean handleOption(String current, Iterator<String> remaining) Implements javax. Doc from javax. Handles one option. If
| |
| hasLocation | back to summary |
|---|---|
| public boolean hasLocation(JavaFileManager. Implements javax. Doc from javax. Determines if a location is known to this file manager.
| |
| inferBinaryName | back to summary |
|---|---|
| public String inferBinaryName(JavaFileManager. Implements javax. Doc from javax. Infers a binary name of a file object based on a package-oriented location. The binary name returned might not be a valid binary name according to The Java Language Specification.
| |
| inferModuleName | back to summary |
|---|---|
| public String inferModuleName(JavaFileManager. Overrides default javax. Doc from javax. Infer the name of the module from its location, as returned by
| |
| installReleaseFileManager | back to summary |
|---|---|
| public static void installReleaseFileManager(Context context, JavaFileManager releaseFM, JavaFileManager originalFM) | |
| isSameFile | back to summary |
|---|---|
| public boolean isSameFile(FileObject a, FileObject b) Implements javax. Doc from javax. Compares two file objects and returns true if they represent the same underlying object.
| |
| isSupportedOption | back to summary |
|---|---|
| public int isSupportedOption(String option) Implements javax. Doc from javax. Determines if the given option is supported and if so, the number of arguments the option takes.
| |
| list | back to summary |
|---|---|
| public Iterable Implements javax. Doc from javax. Lists all file objects matching the given criteria in the given package-oriented location. List file objects in "subpackages" if recurse is true. Note even if the given location is unknown to this file
manager, it may not return
| |
| listLocationsForModules | back to summary |
|---|---|
| public Iterable Overrides default javax. Doc from javax. Lists the locations for all the modules in a module-oriented location or an output location. The locations that are returned will be output locations if the given location is an output, or it will be a package-oriented locations.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final StandardJavaFileManager |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Path | asPath(FileObject file)
Overrides default javax. Returns the path, if any, underlying this file object (optional operation). |
| public Iterable | getJavaFileObjects(File... files)
Implements javax. Returns file objects representing the given files. |
| public Iterable | getJavaFileObjects(Path... paths)
Overrides default javax. Returns file objects representing the given paths. |
| public Iterable | getJavaFileObjects(String... names)
Implements javax. Returns file objects representing the given file names. |
| public Iterable | getJavaFileObjectsFromFiles(Iterable<? extends File> files)
Implements javax. Returns file objects representing the given files. |
| public Iterable | getJavaFileObjectsFromPaths(Collection<? extends Path> paths)
Overrides default javax. Returns file objects representing the given paths. |
| public Iterable | getJavaFileObjectsFromPaths(Iterable<? extends Path> paths)
Overrides default javax.
Deprecated
since 13.
Returns file objects representing the given paths. |
| public Iterable | getJavaFileObjectsFromStrings(Iterable<String> names)
Implements javax. Returns file objects representing the given file names. |
| public Iterable | getLocation(JavaFileManager.
Implements javax. Returns the search path associated with the given location. |
| public Iterable | getLocationAsPaths(JavaFileManager.
Overrides default javax. Returns the search path associated with the given location. |
| public boolean | isSameFile(FileObject a, FileObject b)
Overrides com. Implements javax. Compares two file objects and return true if they represent the same canonical file, zip file entry, or entry in any file system based container. |
| public void | setLocation(JavaFileManager.
Implements javax. Associates the given search path with the given location. |
| public void | setLocationForModule(JavaFileManager.
Overrides default javax. Associates the given search path with the given module and location, which must be a module-oriented or output location. |
| public void | setLocationFromPaths(JavaFileManager.
Overrides default javax. Associates the given search path with the given location. |
| public void | setPathFactory(StandardJavaFileManager.
Overrides default javax. Specify a factory that can be used to generate a path from a string, or series of strings. |
| baseSJFM | back to summary |
|---|---|
| private final StandardJavaFileManager baseSJFM | |
| DelegatingSJFM | back to summary |
|---|---|
| private DelegatingSJFM(JavaFileManager releaseFM, StandardJavaFileManager baseSJFM) | |
| asPath | back to summary |
|---|---|
| public Path asPath(FileObject file) Overrides default javax. Doc from javax. Returns the path, if any, underlying this file object (optional operation).
File objects derived from a
| |
| getJavaFileObjects | back to summary |
|---|---|
| public Iterable Implements javax. Doc from javax. Returns file objects representing the given files. Convenience method equivalent to: getJavaFileObjectsFromFiles(Arrays.asList(files))
| |
| getJavaFileObjects | back to summary |
|---|---|
| public Iterable Overrides default javax. Doc from javax. Returns file objects representing the given paths. Convenience method equivalent to: getJavaFileObjectsFromPaths(Arrays.asList(paths))
| |
| getJavaFileObjects | back to summary |
|---|---|
| public Iterable Implements javax. Doc from javax. Returns file objects representing the given file names. Convenience method equivalent to: getJavaFileObjectsFromStrings(Arrays.asList(names))
| |
| getJavaFileObjectsFromFiles | back to summary |
|---|---|
| public Iterable Implements javax. Doc from javax. Returns file objects representing the given files.
| |
| getJavaFileObjectsFromPaths | back to summary |
|---|---|
| public Iterable Overrides default javax. Doc from javax. Returns file objects representing the given paths.
| |
| getJavaFileObjectsFromPaths | back to summary |
|---|---|
| public Iterable Overrides default javax. Doc from javax. Deprecated since 13. Returns file objects representing the given paths.
| |
| getJavaFileObjectsFromStrings | back to summary |
|---|---|
| public Iterable Implements javax. Doc from javax. Returns file objects representing the given file names.
| |
| getLocation | back to summary |
|---|---|
| public Iterable Implements javax. Doc from javax. Returns the search path associated with the given location.
| |
| getLocationAsPaths | back to summary |
|---|---|
| public Iterable Overrides default javax. Doc from javax. Returns the search path associated with the given location.
| |
| isSameFile | back to summary |
|---|---|
| public boolean isSameFile(FileObject a, FileObject b) Overrides com. Implements javax. Doc from javax. Compares two file objects and return true if they represent the same canonical file, zip file entry, or entry in any file system based container.
| |
| setLocation | back to summary |
|---|---|
| public void setLocation(JavaFileManager. Implements javax. Doc from javax. Associates the given search path with the given location. Any previous value will be discarded. If the location is a module-oriented or output location, any module-specific associations set up by setLocationForModule will be cancelled.
| |
| setLocationForModule | back to summary |
|---|---|
| public void setLocationForModule(JavaFileManager. Overrides default javax. Doc from javax. Associates the given search path with the given module and location, which must be a module-oriented or output location. Any previous value will be discarded. This overrides any default association derived from the search path associated with the location itself. All such module-specific associations will be cancelled if a new search path is associated with the location by calling setLocation or setLocationFromPaths.
| |
| setLocationFromPaths | back to summary |
|---|---|
| public void setLocationFromPaths(JavaFileManager. Overrides default javax. Doc from javax. Associates the given search path with the given location. Any previous value will be discarded. If the location is a module-oriented or output location, any module-specific associations set up by setLocationForModule will be cancelled.
| |
| setPathFactory | back to summary |
|---|---|
| public void setPathFactory(StandardJavaFileManager. Overrides default javax. Doc from javax. Specify a factory that can be used to generate a path from a string, or series of strings.
If this method is not called, a factory whose
| |