Class ReloadableFileManager
- java.lang.Object
-
- javax.tools.ForwardingJavaFileManager<StandardJavaFileManager>
-
- io.quarkus.deployment.dev.filesystem.QuarkusFileManager
-
- io.quarkus.deployment.dev.filesystem.ReloadableFileManager
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable,JavaFileManager,OptionChecker
public class ReloadableFileManager extends QuarkusFileManager
This reloadable file manager handle the class-paths and file locations of separated file manager instances.
It is required for applications that depends on hot-deployed classes of external sources.- See Also:
Quarkus Class Loading Reference
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classReloadableFileManager.JoinClassLoaderA class loader that combines multiple class loaders into one.
The classes loaded by this class loader are associated with this class loader, i.e.-
Nested classes/interfaces inherited from class io.quarkus.deployment.dev.filesystem.QuarkusFileManager
QuarkusFileManager.Context
-
Nested classes/interfaces inherited from interface javax.tools.JavaFileManager
JavaFileManager.Location
-
-
Field Summary
-
Fields inherited from class javax.tools.ForwardingJavaFileManager
fileManager
-
-
Constructor Summary
Constructors Modifier Constructor Description ReloadableFileManager(Supplier<StandardJavaFileManager> supplier, QuarkusFileManager.Context context)protectedReloadableFileManager(StandardJavaFileManager fileManager, StandardJavaFileManager reloadableFileManager, QuarkusFileManager.Context context)
-
Method Summary
-
Methods inherited from class javax.tools.ForwardingJavaFileManager
flush, isSameFile, isSupportedOption
-
-
-
-
Constructor Detail
-
ReloadableFileManager
public ReloadableFileManager(Supplier<StandardJavaFileManager> supplier, QuarkusFileManager.Context context)
-
ReloadableFileManager
protected ReloadableFileManager(StandardJavaFileManager fileManager, StandardJavaFileManager reloadableFileManager, QuarkusFileManager.Context context)
-
-
Method Detail
-
getClassLoader
public ClassLoader getClassLoader(JavaFileManager.Location location)
- Specified by:
getClassLoaderin interfaceJavaFileManager- Overrides:
getClassLoaderin classForwardingJavaFileManager<StandardJavaFileManager>
-
list
public Iterable<JavaFileObject> list(JavaFileManager.Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse) throws IOException
- Specified by:
listin interfaceJavaFileManager- Overrides:
listin classForwardingJavaFileManager<StandardJavaFileManager>- Throws:
IOException
-
inferBinaryName
public String inferBinaryName(JavaFileManager.Location location, JavaFileObject file)
- Specified by:
inferBinaryNamein interfaceJavaFileManager- Overrides:
inferBinaryNamein classForwardingJavaFileManager<StandardJavaFileManager>
-
handleOption
public boolean handleOption(String current, Iterator<String> remaining)
- Specified by:
handleOptionin interfaceJavaFileManager- Overrides:
handleOptionin classForwardingJavaFileManager<StandardJavaFileManager>
-
hasLocation
public boolean hasLocation(JavaFileManager.Location location)
- Specified by:
hasLocationin interfaceJavaFileManager- Overrides:
hasLocationin classForwardingJavaFileManager<StandardJavaFileManager>
-
getJavaFileForInput
public JavaFileObject getJavaFileForInput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind) throws IOException
- Specified by:
getJavaFileForInputin interfaceJavaFileManager- Overrides:
getJavaFileForInputin classForwardingJavaFileManager<StandardJavaFileManager>- Throws:
IOException
-
getJavaFileForOutput
public JavaFileObject getJavaFileForOutput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject sibling) throws IOException
- Specified by:
getJavaFileForOutputin interfaceJavaFileManager- Overrides:
getJavaFileForOutputin classForwardingJavaFileManager<StandardJavaFileManager>- Throws:
IOException
-
getFileForInput
public FileObject getFileForInput(JavaFileManager.Location location, String packageName, String relativeName) throws IOException
- Specified by:
getFileForInputin interfaceJavaFileManager- Overrides:
getFileForInputin classForwardingJavaFileManager<StandardJavaFileManager>- Throws:
IOException
-
getFileForOutput
public FileObject getFileForOutput(JavaFileManager.Location location, String packageName, String relativeName, FileObject sibling) throws IOException
- Specified by:
getFileForOutputin interfaceJavaFileManager- Overrides:
getFileForOutputin classForwardingJavaFileManager<StandardJavaFileManager>- Throws:
IOException
-
getLocationForModule
public JavaFileManager.Location getLocationForModule(JavaFileManager.Location location, String moduleName) throws IOException
- Specified by:
getLocationForModulein interfaceJavaFileManager- Overrides:
getLocationForModulein classForwardingJavaFileManager<StandardJavaFileManager>- Throws:
IOException
-
getLocationForModule
public JavaFileManager.Location getLocationForModule(JavaFileManager.Location location, JavaFileObject fo) throws IOException
- Specified by:
getLocationForModulein interfaceJavaFileManager- Overrides:
getLocationForModulein classForwardingJavaFileManager<StandardJavaFileManager>- Throws:
IOException
-
getServiceLoader
public <S> ServiceLoader<S> getServiceLoader(JavaFileManager.Location location, Class<S> service) throws IOException
- Specified by:
getServiceLoaderin interfaceJavaFileManager- Overrides:
getServiceLoaderin classForwardingJavaFileManager<StandardJavaFileManager>- Throws:
IOException
-
inferModuleName
public String inferModuleName(JavaFileManager.Location location) throws IOException
- Specified by:
inferModuleNamein interfaceJavaFileManager- Overrides:
inferModuleNamein classForwardingJavaFileManager<StandardJavaFileManager>- Throws:
IOException
-
listLocationsForModules
public Iterable<Set<JavaFileManager.Location>> listLocationsForModules(JavaFileManager.Location location)
- Specified by:
listLocationsForModulesin interfaceJavaFileManager- Overrides:
listLocationsForModulesin classForwardingJavaFileManager<StandardJavaFileManager>
-
contains
public boolean contains(JavaFileManager.Location location, FileObject fo) throws IOException
- Specified by:
containsin interfaceJavaFileManager- Overrides:
containsin classForwardingJavaFileManager<StandardJavaFileManager>- Throws:
IOException
-
getJavaSources
public Iterable<? extends JavaFileObject> getJavaSources(Iterable<? extends File> files)
- Specified by:
getJavaSourcesin classQuarkusFileManager
-
reset
public void reset(QuarkusFileManager.Context context)
- Overrides:
resetin classQuarkusFileManager
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceJavaFileManager- Overrides:
closein classQuarkusFileManager- Throws:
IOException
-
-