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 ClassPathResourceLoaderdefaultLoader(@Nullable ClassLoader classLoader) Return the defaultClassPathResourceLoaderfor the given class loader.default booleansupportsPrefix(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:
supportsPrefixin 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 defaultClassPathResourceLoaderfor the given class loader.- Parameters:
classLoader- The classloader- Returns:
- The default loader
-