Class BundleUtil.BundleGroupClassLoader
- java.lang.Object
-
- java.lang.ClassLoader
-
- com.inductiveautomation.ignition.common.BundleUtil.BundleGroupClassLoader
-
- Enclosing class:
- BundleUtil
protected class BundleUtil.BundleGroupClassLoader extends java.lang.ClassLoader
BundleUtil.BundleGroupClassLoader
exists so that getResource*() calls can be intercepted and directed toBundleUtil.getLangPackLoader()
and the wrappedClassLoader
before going to the systemClassLoader
if necessary. Using aBundleUtil.BundleGroupClassLoader
for anything other than loading resources will not work the way you want it to, so don't do it. Nothing but getResource*() calls are delegated, so you'll end up calling the systemClassLoader
for all other calls.
-
-
Constructor Summary
Constructors Constructor Description BundleGroupClassLoader(java.lang.ClassLoader wrapped)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.URL
getResource(java.lang.String name)
java.io.InputStream
getResourceAsStream(java.lang.String name)
java.util.Enumeration<java.net.URL>
getResources(java.lang.String name)
boolean
isValid()
-
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findClass, findLibrary, findLoadedClass, findResource, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
-
-
-
Method Detail
-
getResource
public java.net.URL getResource(java.lang.String name)
- Overrides:
getResource
in classjava.lang.ClassLoader
-
getResources
public java.util.Enumeration<java.net.URL> getResources(java.lang.String name) throws java.io.IOException
- Overrides:
getResources
in classjava.lang.ClassLoader
- Throws:
java.io.IOException
-
getResourceAsStream
public java.io.InputStream getResourceAsStream(java.lang.String name)
- Overrides:
getResourceAsStream
in classjava.lang.ClassLoader
-
isValid
public boolean isValid()
- Returns:
true
if thisBundleUtil.BundleGroupClassLoader
should still be used to load resources.
-
-