All Packages This Package Previous Next
Class sqlj.runtime.profile.DefaultLoader
java.lang.Object
|
+----sqlj.runtime.profile.DefaultLoader
- public class DefaultLoader
- extends Object
- implements Loader
The default profile loader implementation. The default profile loader
implements the loader interface by deferring to a wrapped class loader
argument.
-
DefaultLoader(ClassLoader)
- Creates a default profile loader whose implementation will defer to
the passed class loader.
-
getResourceAsStream(String)
- Creates the named resource as an input stream using the underlying
class loader's
getResourceAsStream
method, or
ClassLoader.getSystemResourceAsStream
if the underlying
class loader is null.
-
loadClass(String)
- Loads the given class using the underlying class loader's
loadClass
method, or Class.forName
if the
underlying class loader is null.
DefaultLoader
public DefaultLoader(ClassLoader loader)
- Creates a default profile loader whose implementation will defer to
the passed class loader. If the passed loader is null, the system
loader will be used instead.
- Parameters:
- the - class loader to use for loading classes and resources,
or null if system class loader should be used.
loadClass
public Class loadClass(String className) throws ClassNotFoundException
- Loads the given class using the underlying class loader's
loadClass
method, or Class.forName
if the
underlying class loader is null.
- Parameters:
- name - the fully qualified name of the desired Class
- Returns:
- the resulting Class
- Throws: ClassNotFoundException
- if the underlying loader cannot find a definition for the class
- See Also:
- loadClass, loadClass, forName
getResourceAsStream
public InputStream getResourceAsStream(String name)
- Creates the named resource as an input stream using the underlying
class loader's
getResourceAsStream
method, or
ClassLoader.getSystemResourceAsStream
if the underlying
class loader is null.
- Parameters:
- name - the name of the resource, to be used as is.
- Returns:
- an InputStream on the resource, or null if not found.
- See Also:
- getResourceAsStream, getResourceAsStream, getSystemResourceAsStream
All Packages This Package Previous Next