Package nz.org.riskscape.engine.i18n
Class ResourceClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
nz.org.riskscape.engine.i18n.ResourceClassLoader
- All Implemented Interfaces:
Closeable
,AutoCloseable
A ClassLoader
for loading resources from the supplied URL
s only.
In effect this class loader has no parent, prevent them from being found rather than the resources found in the URLs.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionResourceClassLoader
(String subPath, URL... urls) ResourceClassLoader
(URL... urls) -
Method Summary
Modifier and TypeMethodDescriptiongetResource
(String name) getResources
(String name) Class<?>
toString()
Methods inherited from class java.net.URLClassLoader
addURL, close, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstance
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Field Details
-
DEFAULT_SUB_PATH
- See Also:
-
-
Constructor Details
-
ResourceClassLoader
-
ResourceClassLoader
-
-
Method Details
-
getResource
- Overrides:
getResource
in classClassLoader
-
getResources
- Overrides:
getResources
in classClassLoader
- Throws:
IOException
-
loadClass
- Overrides:
loadClass
in classClassLoader
- Throws:
ClassNotFoundException
-
toString
-