Skip navigation links
com.sun.istack.tools

Class ParallelWorldClassLoader

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      private java.util.Set<java.util.jar.JarFile> jars 
      private java.lang.String prefix
      Strings like "prefix/", "abc/", or "" to indicate classes should be loaded normally.
    • Constructor Summary

      Constructors 
      Constructor and Description
      ParallelWorldClassLoader(java.lang.ClassLoader parent, java.lang.String prefix) 
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void close() 
      protected java.lang.Class findClass(java.lang.String name) 
      protected java.net.URL findResource(java.lang.String name) 
      protected java.util.Enumeration<java.net.URL> findResources(java.lang.String name) 
      static java.net.URL toJarUrl(java.net.URL res)
      Given the URL inside jar, returns the URL to the jar itself.
      • Methods inherited from class java.lang.ClassLoader

        clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
      • Methods inherited from class java.lang.Object

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

      • prefix

        private final java.lang.String prefix
        Strings like "prefix/", "abc/", or "" to indicate classes should be loaded normally.
      • jars

        private final java.util.Set<java.util.jar.JarFile> jars
    • Constructor Detail

      • ParallelWorldClassLoader

        public ParallelWorldClassLoader(java.lang.ClassLoader parent,
                                        java.lang.String prefix)
    • Method Detail

      • findClass

        protected java.lang.Class findClass(java.lang.String name)
                                     throws java.lang.ClassNotFoundException
        Overrides:
        findClass in class java.lang.ClassLoader
        Throws:
        java.lang.ClassNotFoundException
      • findResource

        protected java.net.URL findResource(java.lang.String name)
        Overrides:
        findResource in class java.lang.ClassLoader
      • findResources

        protected java.util.Enumeration<java.net.URL> findResources(java.lang.String name)
                                                             throws java.io.IOException
        Overrides:
        findResources in class java.lang.ClassLoader
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.io.IOException
      • toJarUrl

        public static java.net.URL toJarUrl(java.net.URL res)
                                     throws java.lang.ClassNotFoundException,
                                            java.net.MalformedURLException
        Given the URL inside jar, returns the URL to the jar itself.
        Throws:
        java.lang.ClassNotFoundException
        java.net.MalformedURLException