Class ClassLoaders
- java.lang.Object
-
- org.codehaus.commons.compiler.lang.ClassLoaders
-
public final class ClassLoaders extends java.lang.Object
Utility methods around theClassLoader
.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.ClassLoader
BOOTCLASSPATH_CLASS_LOADER
TheClassLoader
that loads the classes on the currently executing JVM's "boot class path", i.e.static java.lang.ClassLoader
CLASSPATH_CLASS_LOADER
TheClassLoader
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 aClassLoader
that implementsClassLoader.getResourceAsStream(String)
via aResourceFinder
.
-
-
-
Field Detail
-
CLASSPATH_CLASS_LOADER
public static final java.lang.ClassLoader CLASSPATH_CLASS_LOADER
TheClassLoader
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
TheClassLoader
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.
-
-
Method Detail
-
getsResourceAsStream
public static java.lang.ClassLoader getsResourceAsStream(ResourceFinder finder, @Nullable java.lang.ClassLoader parent)
Creates and returns aClassLoader
that implementsClassLoader.getResourceAsStream(String)
via aResourceFinder
.ClassLoader.getResource(String)
returns a non-null
value iff then resoure finder finds aLocatableResource
.Notice that
ClassLoader.getResources(String)
is not overridden.
-
-