CompilingClassLoader to handle
compiled classes
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private final PackageHelper |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public byte[] | |
| 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)nullOverrides javax. Implements javax. Returns a file object for output representing the specified class of the specified kind in the given package-oriented location. |
| public String | inferBinaryName(JavaFileManager.
a location location,a file object file)Overrides javax. Implements javax. Infers a binary name of a file object based on a package-oriented location. |
| public Iterable | list(JavaFileManager.
a location location,a package name packageName, Set<JavaFileObject.return objects only of these kinds kinds,if true include "subpackages" recurse)Overrides javax. Implements javax. Lists all file objects matching the given criteria in the given package-oriented location. |
| compiledClasses | back to summary |
|---|---|
| private final Map<String, ByteArrayOutputStream> compiledClasses | |
| helper | back to summary |
|---|---|
| private final PackageHelper helper | |
| MemoryFileManager | back to summary |
|---|---|
| public MemoryFileManager(ClassLoader classLoader, JavaFileManager fileManager) | |
| getCompiledClass | back to summary |
|---|---|
| public byte[] getCompiledClass(String name) | |
| 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.
| |
| inferBinaryName | back to summary |
|---|---|
| public String inferBinaryName(JavaFileManager. Overrides javax. 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.
| |
| list | back to summary |
|---|---|
| public Iterable Overrides javax. 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
| |