Class ClassLoaders


  • public final class ClassLoaders
    extends java.lang.Object
    Utility methods around the ClassLoader.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.ClassLoader BOOTCLASSPATH_CLASS_LOADER
      The ClassLoader that loads the classes on the currently executing JVM's "boot class path", i.e.
      static java.lang.ClassLoader CLASSPATH_CLASS_LOADER
      The ClassLoader that loads the classes on the currently executing JVM's "class path", i.e.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ClassLoaders()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.ClassLoader getsResourceAsStream​(ResourceFinder finder, java.lang.ClassLoader parent)
      Creates and returns a ClassLoader that implements ClassLoader.getResourceAsStream(String) via a ResourceFinder.
      • Methods inherited from class java.lang.Object

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

      • CLASSPATH_CLASS_LOADER

        public static final java.lang.ClassLoader CLASSPATH_CLASS_LOADER
        The ClassLoader that loads the classes on the currently executing JVM's "class path", i.e. the JARs in the JRE's "lib" and "lib/ext" directories, and the JARs and class directories specified through the class path.
      • BOOTCLASSPATH_CLASS_LOADER

        public static final java.lang.ClassLoader BOOTCLASSPATH_CLASS_LOADER
        The ClassLoader that loads the classes on the currently executing JVM's "boot class path", i.e. the JARs in the JRE's "lib" and "lib/ext" directories, but not the JARs and class directories specified through the --classpath command line option.
    • Constructor Detail

      • ClassLoaders

        private ClassLoaders()
    • Method Detail

      • getsResourceAsStream

        public static java.lang.ClassLoader getsResourceAsStream​(ResourceFinder finder,
                                                                 @Nullable
                                                                 java.lang.ClassLoader parent)
        Creates and returns a ClassLoader that implements ClassLoader.getResourceAsStream(String) via a ResourceFinder.

        ClassLoader.getResource(String) returns a non-null value iff then resoure finder finds a LocatableResource.

        Notice that ClassLoader.getResources(String) is not overridden.