public class JavaInMemoryFileManager extends ForwardingJavaFileManager<StandardJavaFileManager> implements StandardJavaFileManager
StandardJavaFileManager that creates and writes the content of files directly into a
Jar output stream instead of writing the files to disk.JavaFileManager.LocationfileManager| Constructor and Description |
|---|
JavaInMemoryFileManager(StandardJavaFileManager standardManager,
Path jarPath,
java.util.function.Predicate<? super String> removeClassesPredicate) |
close, flush, getClassLoader, getFileForInput, getJavaFileForInput, handleOption, hasLocation, inferBinaryName, isSupportedOptionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, flush, getClassLoader, getFileForInput, getJavaFileForInput, handleOption, hasLocation, inferBinaryNameisSupportedOptionpublic JavaInMemoryFileManager(StandardJavaFileManager standardManager, Path jarPath, java.util.function.Predicate<? super String> removeClassesPredicate)
public JavaFileObject getJavaFileForOutput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject sibling) throws IOException
getJavaFileForOutput in interface JavaFileManagergetJavaFileForOutput in class ForwardingJavaFileManager<StandardJavaFileManager>IOExceptionpublic FileObject getFileForOutput(JavaFileManager.Location location, String packageName, String relativeName, FileObject sibling) throws IOException
getFileForOutput in interface JavaFileManagergetFileForOutput in class ForwardingJavaFileManager<StandardJavaFileManager>IOExceptionpublic boolean isSameFile(FileObject a, FileObject b)
isSameFile in interface JavaFileManagerisSameFile in interface StandardJavaFileManagerisSameFile in class ForwardingJavaFileManager<StandardJavaFileManager>public Iterable<? extends JavaFileObject> getJavaFileObjectsFromFiles(Iterable<? extends File> files)
getJavaFileObjectsFromFiles in interface StandardJavaFileManagerpublic Iterable<? extends JavaFileObject> getJavaFileObjects(File... files)
getJavaFileObjects in interface StandardJavaFileManagerpublic Iterable<? extends JavaFileObject> getJavaFileObjectsFromStrings(Iterable<String> names)
getJavaFileObjectsFromStrings in interface StandardJavaFileManagerpublic Iterable<? extends JavaFileObject> getJavaFileObjects(String... names)
getJavaFileObjects in interface StandardJavaFileManagerpublic void setLocation(JavaFileManager.Location location, Iterable<? extends File> path) throws IOException
setLocation in interface StandardJavaFileManagerIOExceptionpublic Iterable<? extends File> getLocation(JavaFileManager.Location location)
getLocation in interface StandardJavaFileManagerpublic Iterable<JavaFileObject> list(JavaFileManager.Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse) throws IOException
list in interface JavaFileManagerlist in class ForwardingJavaFileManager<StandardJavaFileManager>IOExceptionpublic com.google.common.collect.ImmutableSet<String> writeToJar(JarBuilder jarBuilder)