Class InMemoryFileManager
- java.lang.Object
-
- io.github.mkoncek.classpathless.impl.InMemoryFileManager
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable,JavaFileManager,OptionChecker
public class InMemoryFileManager extends Object implements JavaFileManager
- Author:
- Marián Konček
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface javax.tools.JavaFileManager
JavaFileManager.Location
-
-
Constructor Summary
Constructors Constructor Description InMemoryFileManager(JavaFileManager delegate)
-
Method Summary
-
-
-
Constructor Detail
-
InMemoryFileManager
public InMemoryFileManager(JavaFileManager delegate)
-
-
Method Detail
-
getLocationForModule
public JavaFileManager.Location getLocationForModule(JavaFileManager.Location location, String moduleName) throws IOException
- Specified by:
getLocationForModulein interfaceJavaFileManager- Throws:
IOException
-
getLocationForModule
public JavaFileManager.Location getLocationForModule(JavaFileManager.Location location, JavaFileObject fo) throws IOException
- Specified by:
getLocationForModulein interfaceJavaFileManager- Throws:
IOException
-
getServiceLoader
public <S> ServiceLoader<S> getServiceLoader(JavaFileManager.Location location, Class<S> service) throws IOException
- Specified by:
getServiceLoaderin interfaceJavaFileManager- Throws:
IOException
-
inferModuleName
public String inferModuleName(JavaFileManager.Location location) throws IOException
- Specified by:
inferModuleNamein interfaceJavaFileManager- Throws:
IOException
-
listLocationsForModules
public Iterable<Set<JavaFileManager.Location>> listLocationsForModules(JavaFileManager.Location location) throws IOException
- Specified by:
listLocationsForModulesin interfaceJavaFileManager- Throws:
IOException
-
contains
public boolean contains(JavaFileManager.Location location, FileObject fo) throws IOException
- Specified by:
containsin interfaceJavaFileManager- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceJavaFileManager- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceFlushable- Specified by:
flushin interfaceJavaFileManager- Throws:
IOException
-
isSupportedOption
public int isSupportedOption(String option)
- Specified by:
isSupportedOptionin interfaceOptionChecker
-
isSameFile
public boolean isSameFile(FileObject a, FileObject b)
- Specified by:
isSameFilein interfaceJavaFileManager
-
getClassLoader
public ClassLoader getClassLoader(JavaFileManager.Location location)
- Specified by:
getClassLoaderin interfaceJavaFileManager
-
getFileForInput
public FileObject getFileForInput(JavaFileManager.Location location, String packageName, String relativeName) throws IOException
- Specified by:
getFileForInputin interfaceJavaFileManager- Throws:
IOException
-
getFileForOutput
public FileObject getFileForOutput(JavaFileManager.Location location, String packageName, String relativeName, FileObject sibling) throws IOException
- Specified by:
getFileForOutputin interfaceJavaFileManager- Throws:
IOException
-
getJavaFileForInput
public JavaFileObject getJavaFileForInput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind) throws IOException
- Specified by:
getJavaFileForInputin interfaceJavaFileManager- Throws:
IOException
-
getJavaFileForOutput
public JavaFileObject getJavaFileForOutput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject sibling) throws IOException
- Specified by:
getJavaFileForOutputin interfaceJavaFileManager- Throws:
IOException
-
hasLocation
public boolean hasLocation(JavaFileManager.Location location)
- Specified by:
hasLocationin interfaceJavaFileManager
-
inferBinaryName
public String inferBinaryName(JavaFileManager.Location location, JavaFileObject file)
- Specified by:
inferBinaryNamein interfaceJavaFileManager
-
list
public Iterable<JavaFileObject> list(JavaFileManager.Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse) throws IOException
- Specified by:
listin interfaceJavaFileManager- Throws:
IOException
-
handleOption
public boolean handleOption(String current, Iterator<String> remaining)
- Specified by:
handleOptionin interfaceJavaFileManager
-
-