Package io.micronaut.core.io.scan
Interface ClassPathResourceLoader
-
- All Superinterfaces:
ResourceLoader
- All Known Implementing Classes:
DefaultClassPathResourceLoader
public interface ClassPathResourceLoader extends ResourceLoader
Abstraction to load resources from the classpath.- Since:
- 1.0
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static ClassPathResourceLoaderdefaultLoader(java.lang.ClassLoader classLoader)Return the defaultClassPathResourceLoaderfor the given class loader.java.lang.ClassLoadergetClassLoader()default booleansupportsPrefix(java.lang.String path)-
Methods inherited from interface io.micronaut.core.io.ResourceLoader
forBase, getResource, getResourceAsStream, getResources
-
-
-
-
Method Detail
-
getClassLoader
java.lang.ClassLoader getClassLoader()
- Returns:
- The underlying classloader used by this
ClassPathResourceLoader
-
supportsPrefix
default boolean supportsPrefix(java.lang.String path)
- 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
static ClassPathResourceLoader defaultLoader(@Nullable java.lang.ClassLoader classLoader)
Return the defaultClassPathResourceLoaderfor the given class loader.- Parameters:
classLoader- The classloader- Returns:
- The default loader
-
-