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 class
ReloadableFileManager.JoinClassLoader
A 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)
protected
ReloadableFileManager(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:
getClassLoader
in interfaceJavaFileManager
- Overrides:
getClassLoader
in classForwardingJavaFileManager<StandardJavaFileManager>
-
list
public Iterable<JavaFileObject> list(JavaFileManager.Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse) throws IOException
- Specified by:
list
in interfaceJavaFileManager
- Overrides:
list
in classForwardingJavaFileManager<StandardJavaFileManager>
- Throws:
IOException
-
inferBinaryName
public String inferBinaryName(JavaFileManager.Location location, JavaFileObject file)
- Specified by:
inferBinaryName
in interfaceJavaFileManager
- Overrides:
inferBinaryName
in classForwardingJavaFileManager<StandardJavaFileManager>
-
handleOption
public boolean handleOption(String current, Iterator<String> remaining)
- Specified by:
handleOption
in interfaceJavaFileManager
- Overrides:
handleOption
in classForwardingJavaFileManager<StandardJavaFileManager>
-
hasLocation
public boolean hasLocation(JavaFileManager.Location location)
- Specified by:
hasLocation
in interfaceJavaFileManager
- Overrides:
hasLocation
in classForwardingJavaFileManager<StandardJavaFileManager>
-
getJavaFileForInput
public JavaFileObject getJavaFileForInput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind) throws IOException
- Specified by:
getJavaFileForInput
in interfaceJavaFileManager
- Overrides:
getJavaFileForInput
in classForwardingJavaFileManager<StandardJavaFileManager>
- Throws:
IOException
-
getJavaFileForOutput
public JavaFileObject getJavaFileForOutput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject sibling) throws IOException
- Specified by:
getJavaFileForOutput
in interfaceJavaFileManager
- Overrides:
getJavaFileForOutput
in classForwardingJavaFileManager<StandardJavaFileManager>
- Throws:
IOException
-
getFileForInput
public FileObject getFileForInput(JavaFileManager.Location location, String packageName, String relativeName) throws IOException
- Specified by:
getFileForInput
in interfaceJavaFileManager
- Overrides:
getFileForInput
in classForwardingJavaFileManager<StandardJavaFileManager>
- Throws:
IOException
-
getFileForOutput
public FileObject getFileForOutput(JavaFileManager.Location location, String packageName, String relativeName, FileObject sibling) throws IOException
- Specified by:
getFileForOutput
in interfaceJavaFileManager
- Overrides:
getFileForOutput
in classForwardingJavaFileManager<StandardJavaFileManager>
- Throws:
IOException
-
getLocationForModule
public JavaFileManager.Location getLocationForModule(JavaFileManager.Location location, String moduleName) throws IOException
- Specified by:
getLocationForModule
in interfaceJavaFileManager
- Overrides:
getLocationForModule
in classForwardingJavaFileManager<StandardJavaFileManager>
- Throws:
IOException
-
getLocationForModule
public JavaFileManager.Location getLocationForModule(JavaFileManager.Location location, JavaFileObject fo) throws IOException
- Specified by:
getLocationForModule
in interfaceJavaFileManager
- Overrides:
getLocationForModule
in classForwardingJavaFileManager<StandardJavaFileManager>
- Throws:
IOException
-
getServiceLoader
public <S> ServiceLoader<S> getServiceLoader(JavaFileManager.Location location, Class<S> service) throws IOException
- Specified by:
getServiceLoader
in interfaceJavaFileManager
- Overrides:
getServiceLoader
in classForwardingJavaFileManager<StandardJavaFileManager>
- Throws:
IOException
-
inferModuleName
public String inferModuleName(JavaFileManager.Location location) throws IOException
- Specified by:
inferModuleName
in interfaceJavaFileManager
- Overrides:
inferModuleName
in classForwardingJavaFileManager<StandardJavaFileManager>
- Throws:
IOException
-
listLocationsForModules
public Iterable<Set<JavaFileManager.Location>> listLocationsForModules(JavaFileManager.Location location)
- Specified by:
listLocationsForModules
in interfaceJavaFileManager
- Overrides:
listLocationsForModules
in classForwardingJavaFileManager<StandardJavaFileManager>
-
contains
public boolean contains(JavaFileManager.Location location, FileObject fo) throws IOException
- Specified by:
contains
in interfaceJavaFileManager
- Overrides:
contains
in classForwardingJavaFileManager<StandardJavaFileManager>
- Throws:
IOException
-
getJavaSources
public Iterable<? extends JavaFileObject> getJavaSources(Iterable<? extends File> files)
- Specified by:
getJavaSources
in classQuarkusFileManager
-
reset
public void reset(QuarkusFileManager.Context context)
- Overrides:
reset
in classQuarkusFileManager
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceJavaFileManager
- Overrides:
close
in classQuarkusFileManager
- Throws:
IOException
-
-