Package io.micronaut.core.io.scan
Interface ClassPathResourceLoader
- All Superinterfaces:
ResourceLoader
- All Known Implementing Classes:
DefaultClassPathResourceLoader
Abstraction to load resources from the classpath.
- Since:
- 1.0
- Author:
- James Kleeh, Graeme Rocher
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClassPathResourceLoader
defaultLoader
(@Nullable ClassLoader classLoader) Return the defaultClassPathResourceLoader
for the given class loader.default boolean
supportsPrefix
(String path) Methods inherited from interface io.micronaut.core.io.ResourceLoader
forBase, getResource, getResourceAsStream, getResources
-
Method Details
-
getClassLoader
ClassLoader getClassLoader()- Returns:
- The underlying classloader used by this
ClassPathResourceLoader
-
supportsPrefix
- Specified by:
supportsPrefix
in interfaceResourceLoader
- Parameters:
path
- The path to a resource including a prefix appended by a colon. Ex (classpath:, file:)- Returns:
- Whether the given resource loader supports the prefix
-
defaultLoader
Return the defaultClassPathResourceLoader
for the given class loader.- Parameters:
classLoader
- The classloader- Returns:
- The default loader
-