edu.pdx.cs399J.reflect
Class LoggingClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
edu.pdx.cs399J.reflect.LoggingClassLoader
public class LoggingClassLoader
- extends URLClassLoader
This ClassLoader prints out the name of every class
that it (or its parent) loads.
|
Method Summary |
Class |
loadClass(String className)
Invoked as this class loader is loading a class |
static void |
main(String[] args)
Main program that uses a LoggingClassLoader to load
the class with the given name from a given location. |
| Methods inherited from class java.lang.ClassLoader |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LoggingClassLoader
public LoggingClassLoader(URL[] urls,
ClassLoader parent)
- Creates a
LoggingClassLoader that loads classes from
a given array of URLs. However, before this class loader
attempts to load the class, it will delegate to its parent class
loader.
loadClass
public Class loadClass(String className)
throws ClassNotFoundException
- Invoked as this class loader is loading a class
- Overrides:
loadClass in class ClassLoader
- Throws:
ClassNotFoundException
main
public static void main(String[] args)
- Main program that uses a
LoggingClassLoader to load
the class with the given name from a given location.
Copyright © 2000-2009 Portland State University. All Rights Reserved.