APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.tools.javac.main

public Class DelegatingJavaFileManager

extends Object
implements JavaFileManager
Class Inheritance
All Implemented Interfaces
javax.tools.JavaFileManager, javax.tools.OptionChecker, java.io.Flushable, java.io.Closeable, java.lang.AutoCloseable
Known Direct Subclasses
com.sun.tools.javac.main.DelegatingJavaFileManager.DelegatingSJFM
Imports
java.io.File, .IOException, java.nio.file.Path, java.util.Collection, .Iterator, .ServiceLoader, .Set, javax.tools.FileObject, .JavaFileManager, .JavaFileManager.Location, .JavaFileObject, .JavaFileObject.Kind, .StandardJavaFileManager, com.sun.tools.javac.util.Context

A JavaFileManager that delegates to one of two delegate ClassLoaders.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final JavaFileManager
private final JavaFileManager

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements javax.tools.JavaFileManager.close.

Releases any resources opened by this file manager directly or indirectly.

public boolean
contains(JavaFileManager.Location location, FileObject fo)

Overrides default javax.tools.JavaFileManager.contains.

Determines whether or not a given file object is "contained in" a specified location.

private JavaFileManager
public void
flush()

Implements javax.tools.JavaFileManager.flush.

Flushes any resources opened for output by this file manager directly or indirectly.

public JavaFileManager
public ClassLoader
getClassLoader(JavaFileManager.Location location)

Implements javax.tools.JavaFileManager.getClassLoader.

Returns a class loader for loading plug-ins from the given package-oriented location.

public FileObject
getFileForInput(JavaFileManager.Location location, String packageName, String relativeName)

Implements javax.tools.JavaFileManager.getFileForInput.

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.Location location, String packageName, String relativeName, FileObject sibling)

Implements javax.tools.JavaFileManager.getFileForOutput.

Returns a file object for output representing the specified relative name in the specified package in the given location.

public FileObject
getFileForOutputForOriginatingFiles(JavaFileManager.Location location, String packageName, String relativeName, FileObject... originatingFiles)

Overrides default javax.tools.JavaFileManager.getFileForOutputForOriginatingFiles.

Returns a file object for output representing the specified relative name in the specified package in the given location.

public JavaFileObject
getJavaFileForInput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind)

Implements javax.tools.JavaFileManager.getJavaFileForInput.

Returns a file object for input representing the specified class of the specified kind in the given package-oriented location.

public JavaFileObject
getJavaFileForOutput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject sibling)

Implements javax.tools.JavaFileManager.getJavaFileForOutput.

Returns a file object for output representing the specified class of the specified kind in the given package-oriented location.

public JavaFileObject
getJavaFileForOutputForOriginatingFiles(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject... originatingFiles)

Overrides default javax.tools.JavaFileManager.getJavaFileForOutputForOriginatingFiles.

Returns a file object for output representing the specified class of the specified kind in the given package-oriented location.

public JavaFileManager.Location
getLocationForModule(JavaFileManager.Location location, String moduleName)

Overrides default javax.tools.JavaFileManager.getLocationForModule.

Gets a location for a named module within a location, which may be either a module-oriented location or an output location.

public JavaFileManager.Location
getLocationForModule(JavaFileManager.Location location, JavaFileObject fo)

Overrides default javax.tools.JavaFileManager.getLocationForModule.

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<S>
getServiceLoader(JavaFileManager.Location location, Class<S> service)

Overrides default javax.tools.JavaFileManager.getServiceLoader.

Get a service loader for a specific service class from a given location.

public boolean
handleOption(String current, Iterator<String> remaining)

Implements javax.tools.JavaFileManager.handleOption.

Handles one option.

public boolean
hasLocation(JavaFileManager.Location location)

Implements javax.tools.JavaFileManager.hasLocation.

Determines if a location is known to this file manager.

public String
inferBinaryName(JavaFileManager.Location location, JavaFileObject file)

Implements javax.tools.JavaFileManager.inferBinaryName.

Infers a binary name of a file object based on a package-oriented location.

public String
inferModuleName(JavaFileManager.Location location)

Overrides default javax.tools.JavaFileManager.inferModuleName.

Infer the name of the module from its location, as returned by getLocationForModule or listModuleLocations.

public static void
public boolean
isSameFile(FileObject a, FileObject b)

Implements javax.tools.JavaFileManager.isSameFile.

Compares two file objects and returns true if they represent the same underlying object.

public int
isSupportedOption(String option)

Implements javax.tools.OptionChecker.isSupportedOption.

Determines if the given option is supported and if so, the number of arguments the option takes.

public Iterable<JavaFileObject>
list(JavaFileManager.Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse)

Implements javax.tools.JavaFileManager.list.

Lists all file objects matching the given criteria in the given package-oriented location.

public Iterable<Set<JavaFileManager.Location>>
listLocationsForModules(JavaFileManager.Location location)

Overrides default javax.tools.JavaFileManager.listLocationsForModules.

Lists the locations for all the modules in a module-oriented location or an output location.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

baseFMback to summary
private final JavaFileManager baseFM
releaseFMback to summary
private final JavaFileManager releaseFM

Constructor Detail

DelegatingJavaFileManagerback to summary
private DelegatingJavaFileManager(JavaFileManager releaseFM, JavaFileManager baseFM)

Method Detail

closeback to summary
public void close() throws IOException

Implements javax.tools.JavaFileManager.close.

Doc from javax.tools.JavaFileManager.close.

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.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurred
containsback to summary
public boolean contains(JavaFileManager.Location location, FileObject fo) throws IOException

Overrides default javax.tools.JavaFileManager.contains.

Doc from javax.tools.JavaFileManager.contains.

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 same file object:

getFileForInput(location, packageName, relativeName) getFileForOutput(location, packageName, relativeName, null)
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)
getLocationForModule(location, moduleName)
such that the file object is contained in the (package-oriented) location for that module.
Annotations
@Override
Exceptions
IOException:
if there is a problem determining the result
delegateback to summary
private JavaFileManager delegate(JavaFileManager.Location location)
flushback to summary
public void flush() throws IOException

Implements javax.tools.JavaFileManager.flush.

Doc from javax.tools.JavaFileManager.flush.

Flushes any resources opened for output by this file manager directly or indirectly. Flushing a closed file manager has no effect.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurred
getBaseFileManagerback to summary
public JavaFileManager getBaseFileManager()
getClassLoaderback to summary
public ClassLoader getClassLoader(JavaFileManager.Location location)

Implements javax.tools.JavaFileManager.getClassLoader.

Doc from javax.tools.JavaFileManager.getClassLoader.

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 ANNOTATION_PROCESSOR_PATH location.

Annotations
@Override
getFileForInputback to summary
public FileObject getFileForInput(JavaFileManager.Location location, String packageName, String relativeName) throws IOException

Implements javax.tools.JavaFileManager.getFileForInput.

Doc from javax.tools.JavaFileManager.getFileForInput.

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 JavaFileObject.

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");
getFileForInput(SOURCE_PATH, "com.sun.tools.javac", "resources/compiler.properties");

If the call was executed on Windows, with SOURCE_PATH set to "C:\Documents and Settings\UncleBob\src\share\classes", a valid result would be a file object representing the file "C:\Documents and Settings\UncleBob\src\share\classes\com\sun\tools\javac\resources\compiler.properties".

Annotations
@Override
Exceptions
IOException:
if an I/O error occurred, or if close has been called and this file manager cannot be reopened
getFileForOutputback to summary
public FileObject getFileForOutput(JavaFileManager.Location location, String packageName, String relativeName, FileObject sibling) throws IOException

Implements javax.tools.JavaFileManager.getFileForOutput.

Doc from javax.tools.JavaFileManager.getFileForOutput.

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 JavaFileObject.

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 getFileForInput for an example.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurred, or if close has been called and this file manager cannot be reopened
getFileForOutputForOriginatingFilesback to summary
public FileObject getFileForOutputForOriginatingFiles(JavaFileManager.Location location, String packageName, String relativeName, FileObject... originatingFiles) throws IOException

Overrides default javax.tools.JavaFileManager.getFileForOutputForOriginatingFiles.

Doc from javax.tools.JavaFileManager.getFileForOutputForOriginatingFiles.

Returns a file object for output representing the specified relative name in the specified package in the given location.

The provided originatingFiles represent files that were, in an unspecified way, used to create the content of the file created by this method. See originatingElements in Filer#createResource. Elements#getFileObjectOf may be used to convert the Elements to FileObjects.

If the returned object represents a source or class file, it must be an instance of JavaFileObject.

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 originatingFiles. See getFileForInput for an example.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurred, or if close has been called and this file manager cannot be reopened
getJavaFileForInputback to summary
public JavaFileObject getJavaFileForInput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind) throws IOException

Implements javax.tools.JavaFileManager.getJavaFileForInput.

Doc from javax.tools.JavaFileManager.getJavaFileForInput.

Returns a file object for input representing the specified class of the specified kind in the given package-oriented location.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurred, or if close has been called and this file manager cannot be reopened
getJavaFileForOutputback to summary
public JavaFileObject getJavaFileForOutput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject sibling) throws IOException

Implements javax.tools.JavaFileManager.getJavaFileForOutput.

Doc from javax.tools.JavaFileManager.getJavaFileForOutput.

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.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurred, or if close has been called and this file manager cannot be reopened
getJavaFileForOutputForOriginatingFilesback to summary
public JavaFileObject getJavaFileForOutputForOriginatingFiles(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject... originatingFiles) throws IOException

Overrides default javax.tools.JavaFileManager.getJavaFileForOutputForOriginatingFiles.

Doc from javax.tools.JavaFileManager.getJavaFileForOutputForOriginatingFiles.

Returns a file object for output representing the specified class of the specified kind in the given package-oriented location.

The provided originatingFiles represent files that were, in an unspecified way, used to create the content of the file created by this method. See originatingElements in Filer#createSourceFile. Elements#getFileObjectOf may be used to convert the Elements to FileObjects.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurred, or if close has been called and this file manager cannot be reopened
getLocationForModuleback to summary
public JavaFileManager.Location getLocationForModule(JavaFileManager.Location location, String moduleName) throws IOException

Overrides default javax.tools.JavaFileManager.getLocationForModule.

Doc from javax.tools.JavaFileManager.getLocationForModule.

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.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurred
getLocationForModuleback to summary
public JavaFileManager.Location getLocationForModule(JavaFileManager.Location location, JavaFileObject fo) throws IOException

Overrides default javax.tools.JavaFileManager.getLocationForModule.

Doc from javax.tools.JavaFileManager.getLocationForModule.

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.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurred
getServiceLoaderback to summary
public <S> ServiceLoader<S> getServiceLoader(JavaFileManager.Location location, Class<S> service) throws IOException

Overrides default javax.tools.JavaFileManager.getServiceLoader.

Doc from javax.tools.JavaFileManager.getServiceLoader.

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 META-INF/services.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurred
handleOptionback to summary
public boolean handleOption(String current, Iterator<String> remaining)

Implements javax.tools.JavaFileManager.handleOption.

Doc from javax.tools.JavaFileManager.handleOption.

Handles one option. If current is an option to this file manager, it will consume any arguments to that option from remaining and return true, otherwise return false.

Annotations
@Override
hasLocationback to summary
public boolean hasLocation(JavaFileManager.Location location)

Implements javax.tools.JavaFileManager.hasLocation.

Doc from javax.tools.JavaFileManager.hasLocation.

Determines if a location is known to this file manager.

Annotations
@Override
inferBinaryNameback to summary
public String inferBinaryName(JavaFileManager.Location location, JavaFileObject file)

Implements javax.tools.JavaFileManager.inferBinaryName.

Doc from javax.tools.JavaFileManager.inferBinaryName.

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.

Annotations
@Override
inferModuleNameback to summary
public String inferModuleName(JavaFileManager.Location location) throws IOException

Overrides default javax.tools.JavaFileManager.inferModuleName.

Doc from javax.tools.JavaFileManager.inferModuleName.

Infer the name of the module from its location, as returned by getLocationForModule or listModuleLocations.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurred
installReleaseFileManagerback to summary
public static void installReleaseFileManager(Context context, JavaFileManager releaseFM, JavaFileManager originalFM)
isSameFileback to summary
public boolean isSameFile(FileObject a, FileObject b)

Implements javax.tools.JavaFileManager.isSameFile.

Doc from javax.tools.JavaFileManager.isSameFile.

Compares two file objects and returns true if they represent the same underlying object.

Annotations
@Override
isSupportedOptionback to summary
public int isSupportedOption(String option)

Implements javax.tools.OptionChecker.isSupportedOption.

Doc from javax.tools.OptionChecker.isSupportedOption.

Determines if the given option is supported and if so, the number of arguments the option takes.

Annotations
@Override
listback to summary
public Iterable<JavaFileObject> list(JavaFileManager.Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse) throws IOException

Implements javax.tools.JavaFileManager.list.

Doc from javax.tools.JavaFileManager.list.

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 null. Also, an unknown location may not cause an exception.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurred, or if close has been called and this file manager cannot be reopened
listLocationsForModulesback to summary
public Iterable<Set<JavaFileManager.Location>> listLocationsForModules(JavaFileManager.Location location) throws IOException

Overrides default javax.tools.JavaFileManager.listLocationsForModules.

Doc from javax.tools.JavaFileManager.listLocationsForModules.

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.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurred
com.sun.tools.javac.main back to summary

private final Class DelegatingJavaFileManager.DelegatingSJFM

extends DelegatingJavaFileManager
implements StandardJavaFileManager
Class Inheritance
All Implemented Interfaces
javax.tools.StandardJavaFileManager, javax.tools.JavaFileManager, javax.tools.OptionChecker, java.io.Flushable, java.io.Closeable, java.lang.AutoCloseable

Field Summary

Modifier and TypeField and Description
private final StandardJavaFileManager

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public Path
asPath(FileObject file)

Overrides default javax.tools.StandardJavaFileManager.asPath.

Returns the path, if any, underlying this file object (optional operation).

public Iterable<? extends JavaFileObject>
getJavaFileObjects(File... files)

Implements javax.tools.StandardJavaFileManager.getJavaFileObjects.

Returns file objects representing the given files.

public Iterable<? extends JavaFileObject>
getJavaFileObjects(Path... paths)

Overrides default javax.tools.StandardJavaFileManager.getJavaFileObjects.

Returns file objects representing the given paths.

public Iterable<? extends JavaFileObject>
getJavaFileObjects(String... names)

Implements javax.tools.StandardJavaFileManager.getJavaFileObjects.

Returns file objects representing the given file names.

public Iterable<? extends JavaFileObject>
getJavaFileObjectsFromFiles(Iterable<? extends File> files)

Implements javax.tools.StandardJavaFileManager.getJavaFileObjectsFromFiles.

Returns file objects representing the given files.

public Iterable<? extends JavaFileObject>
getJavaFileObjectsFromPaths(Collection<? extends Path> paths)

Overrides default javax.tools.StandardJavaFileManager.getJavaFileObjectsFromPaths.

Returns file objects representing the given paths.

public Iterable<? extends JavaFileObject>
getJavaFileObjectsFromPaths(Iterable<? extends Path> paths)

Overrides default javax.tools.StandardJavaFileManager.getJavaFileObjectsFromPaths.

Deprecated since 13.

Returns file objects representing the given paths.

public Iterable<? extends JavaFileObject>
getJavaFileObjectsFromStrings(Iterable<String> names)

Implements javax.tools.StandardJavaFileManager.getJavaFileObjectsFromStrings.

Returns file objects representing the given file names.

public Iterable<? extends File>
getLocation(JavaFileManager.Location location)

Implements javax.tools.StandardJavaFileManager.getLocation.

Returns the search path associated with the given location.

public Iterable<? extends Path>
getLocationAsPaths(JavaFileManager.Location location)

Overrides default javax.tools.StandardJavaFileManager.getLocationAsPaths.

Returns the search path associated with the given location.

public boolean
isSameFile(FileObject a, FileObject b)

Overrides com.sun.tools.javac.main.DelegatingJavaFileManager.isSameFile.

Implements javax.tools.StandardJavaFileManager.isSameFile, javax.tools.JavaFileManager.isSameFile.

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.Location location, Iterable<? extends File> files)

Implements javax.tools.StandardJavaFileManager.setLocation.

Associates the given search path with the given location.

public void
setLocationForModule(JavaFileManager.Location location, String moduleName, Collection<? extends Path> paths)

Overrides default javax.tools.StandardJavaFileManager.setLocationForModule.

Associates the given search path with the given module and location, which must be a module-oriented or output location.

public void
setLocationFromPaths(JavaFileManager.Location location, Collection<? extends Path> paths)

Overrides default javax.tools.StandardJavaFileManager.setLocationFromPaths.

Associates the given search path with the given location.

public void
setPathFactory(StandardJavaFileManager.PathFactory f)

Overrides default javax.tools.StandardJavaFileManager.setPathFactory.

Specify a factory that can be used to generate a path from a string, or series of strings.

Inherited from com.sun.tools.javac.main.DelegatingJavaFileManager:
closecontainsflushgetBaseFileManagergetClassLoadergetFileForInputgetFileForOutputgetFileForOutputForOriginatingFilesgetJavaFileForInputgetJavaFileForOutputgetJavaFileForOutputForOriginatingFilesgetLocationForModulegetLocationForModulegetServiceLoaderhandleOptionhasLocationinferBinaryNameinferModuleNameinstallReleaseFileManagerisSupportedOptionlistlistLocationsForModules

Field Detail

baseSJFMback to summary
private final StandardJavaFileManager baseSJFM

Constructor Detail

DelegatingSJFMback to summary
private DelegatingSJFM(JavaFileManager releaseFM, StandardJavaFileManager baseSJFM)

Method Detail

asPathback to summary
public Path asPath(FileObject file)

Overrides default javax.tools.StandardJavaFileManager.asPath.

Doc from javax.tools.StandardJavaFileManager.asPath.

Returns the path, if any, underlying this file object (optional operation). File objects derived from a FileSystem, including the default file system, typically have a corresponding underlying Path object. In such cases, this method may be used to access that object.

Annotations
@Override
getJavaFileObjectsback to summary
public Iterable<? extends JavaFileObject> getJavaFileObjects(File... files)

Implements javax.tools.StandardJavaFileManager.getJavaFileObjects.

Doc from javax.tools.StandardJavaFileManager.getJavaFileObjects.

Returns file objects representing the given files. Convenience method equivalent to:

getJavaFileObjectsFromFiles(Arrays.asList(files))
getJavaFileObjectsFromFiles(Arrays.asList(files))
Annotations
@Override
getJavaFileObjectsback to summary
public Iterable<? extends JavaFileObject> getJavaFileObjects(Path... paths)

Overrides default javax.tools.StandardJavaFileManager.getJavaFileObjects.

Doc from javax.tools.StandardJavaFileManager.getJavaFileObjects.

Returns file objects representing the given paths. Convenience method equivalent to:

getJavaFileObjectsFromPaths(Arrays.asList(paths))
getJavaFileObjectsFromPaths(Arrays.asList(paths))
Annotations
@Override
getJavaFileObjectsback to summary
public Iterable<? extends JavaFileObject> getJavaFileObjects(String... names)

Implements javax.tools.StandardJavaFileManager.getJavaFileObjects.

Doc from javax.tools.StandardJavaFileManager.getJavaFileObjects.

Returns file objects representing the given file names. Convenience method equivalent to:

getJavaFileObjectsFromStrings(Arrays.asList(names))
getJavaFileObjectsFromStrings(Arrays.asList(names))
Annotations
@Override
getJavaFileObjectsFromFilesback to summary
public Iterable<? extends JavaFileObject> getJavaFileObjectsFromFiles(Iterable<? extends File> files)

Implements javax.tools.StandardJavaFileManager.getJavaFileObjectsFromFiles.

Doc from javax.tools.StandardJavaFileManager.getJavaFileObjectsFromFiles.

Returns file objects representing the given files.

Annotations
@Override
getJavaFileObjectsFromPathsback to summary
public Iterable<? extends JavaFileObject> getJavaFileObjectsFromPaths(Collection<? extends Path> paths)

Overrides default javax.tools.StandardJavaFileManager.getJavaFileObjectsFromPaths.

Doc from javax.tools.StandardJavaFileManager.getJavaFileObjectsFromPaths.

Returns file objects representing the given paths.

Annotations
@Override
getJavaFileObjectsFromPathsback to summary
public Iterable<? extends JavaFileObject> getJavaFileObjectsFromPaths(Iterable<? extends Path> paths)

Overrides default javax.tools.StandardJavaFileManager.getJavaFileObjectsFromPaths.

Doc from javax.tools.StandardJavaFileManager.getJavaFileObjectsFromPaths.

Deprecated

since 13.

Returns file objects representing the given paths.

Annotations
@Deprecated
since:13
@Override
getJavaFileObjectsFromStringsback to summary
public Iterable<? extends JavaFileObject> getJavaFileObjectsFromStrings(Iterable<String> names)

Implements javax.tools.StandardJavaFileManager.getJavaFileObjectsFromStrings.

Doc from javax.tools.StandardJavaFileManager.getJavaFileObjectsFromStrings.

Returns file objects representing the given file names.

Annotations
@Override
getLocationback to summary
public Iterable<? extends File> getLocation(JavaFileManager.Location location)

Implements javax.tools.StandardJavaFileManager.getLocation.

Doc from javax.tools.StandardJavaFileManager.getLocation.

Returns the search path associated with the given location.

Annotations
@Override
getLocationAsPathsback to summary
public Iterable<? extends Path> getLocationAsPaths(JavaFileManager.Location location)

Overrides default javax.tools.StandardJavaFileManager.getLocationAsPaths.

Doc from javax.tools.StandardJavaFileManager.getLocationAsPaths.

Returns the search path associated with the given location.

Annotations
@Override
isSameFileback to summary
public boolean isSameFile(FileObject a, FileObject b)

Overrides com.sun.tools.javac.main.DelegatingJavaFileManager.isSameFile.

Implements javax.tools.StandardJavaFileManager.isSameFile, javax.tools.JavaFileManager.isSameFile.

Doc from javax.tools.StandardJavaFileManager.isSameFile.

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.

Annotations
@Override
setLocationback to summary
public void setLocation(JavaFileManager.Location location, Iterable<? extends File> files) throws IOException

Implements javax.tools.StandardJavaFileManager.setLocation.

Doc from javax.tools.StandardJavaFileManager.setLocation.

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.

Annotations
@Override
Exceptions
IOException:
if location is an output location and does not represent an existing directory
setLocationForModuleback to summary
public void setLocationForModule(JavaFileManager.Location location, String moduleName, Collection<? extends Path> paths) throws IOException

Overrides default javax.tools.StandardJavaFileManager.setLocationForModule.

Doc from javax.tools.StandardJavaFileManager.setLocationForModule.

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.

Annotations
@Override
Exceptions
IOException:
if location is an output location and paths does not represent an existing directory
setLocationFromPathsback to summary
public void setLocationFromPaths(JavaFileManager.Location location, Collection<? extends Path> paths) throws IOException

Overrides default javax.tools.StandardJavaFileManager.setLocationFromPaths.

Doc from javax.tools.StandardJavaFileManager.setLocationFromPaths.

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.

Annotations
@Override
Exceptions
IOException:
if location is an output location and paths does not represent an existing directory
setPathFactoryback to summary
public void setPathFactory(StandardJavaFileManager.PathFactory f)

Overrides default javax.tools.StandardJavaFileManager.setPathFactory.

Doc from javax.tools.StandardJavaFileManager.setPathFactory.

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 getPath method is equivalent to calling java.nio.file.Paths.get(first, more) will be used.

Annotations
@Override