Class files (of kind CLASS
) written to
StandardLocation#CLASS_OUTPUT
will be written to an in-memory cache.
All other file manager operations will be delegated to a specified file manager.
This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
Modifier and Type | Field and Description |
---|---|
private final Map |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
public boolean | contains(JavaFileManager.
the location location,the file object fo)Overrides javax. Overrides default javax. Determines whether or not a given file object is "contained in" a specified location. |
private JavaFileObject | |
public JavaFileObject | getJavaFileForOutput(JavaFileManager.
a package-oriented location location,the name of a class className, JavaFileObject.a file object to be used as hint for placement;
might be sibling)null Overrides javax. Implements javax. Returns a file object for output representing the specified class of the specified kind in the given package-oriented location. |
map | back to summary |
---|---|
private final Map<String, byte[]> map |
MemoryFileManager | back to summary |
---|---|
pack-priv MemoryFileManager(Map<String, byte[]> map, JavaFileManager delegate) |
contains | back to summary |
---|---|
public boolean contains(JavaFileManager. Overrides javax. 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)
|
createInMemoryClassFile | back to summary |
---|---|
private JavaFileObject createInMemoryClassFile(String className) |
getJavaFileForOutput | back to summary |
---|---|
public JavaFileObject getJavaFileForOutput(JavaFileManager. Overrides javax. 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.
|