public class StaticResourceLoader extends Object implements ResourceLoader
CLASSPATH_URL_PREFIX
Constructor and Description |
---|
StaticResourceLoader(Resource baseResource) |
Modifier and Type | Method and Description |
---|---|
ClassLoader |
getClassLoader()
Expose the ClassLoader used by this ResourceLoader.
|
Resource |
getResource(String location)
Return a Resource handle for the specified resource.
|
public StaticResourceLoader(Resource baseResource)
baseResource
- The base resourcepublic Resource getResource(String location)
ResourceLoader
Note that a Resource handle does not imply an existing resource; you need to invoke Resource#exists to check for existence.
getResource
in interface ResourceLoader
location
- the resource locationResourceLoader.CLASSPATH_URL_PREFIX
public ClassLoader getClassLoader()
ResourceLoader
Clients which need to access the ClassLoader directly can do so in a uniform manner with the ResourceLoader, rather than relying on the thread context ClassLoader.
getClassLoader
in interface ResourceLoader
null
)