Class 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 to BundleUtil.getLangPackLoader() and the wrapped ClassLoader before going to the system ClassLoader if necessary.

    Using a BundleUtil.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 system ClassLoader 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BundleGroupClassLoader

        public BundleGroupClassLoader​(java.lang.ClassLoader wrapped)
    • Method Detail

      • getResource

        public java.net.URL getResource​(java.lang.String name)
        Overrides:
        getResource in class java.lang.ClassLoader
      • getResources

        public java.util.Enumeration<java.net.URL> getResources​(java.lang.String name)
                                                         throws java.io.IOException
        Overrides:
        getResources in class java.lang.ClassLoader
        Throws:
        java.io.IOException
      • getResourceAsStream

        public java.io.InputStream getResourceAsStream​(java.lang.String name)
        Overrides:
        getResourceAsStream in class java.lang.ClassLoader