JET

edu.utep.cs.jet.gui.tester
Class FileClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by java.net.URLClassLoader
              extended by edu.utep.cs.jet.gui.AbstractClassLoader
                  extended by edu.utep.cs.jet.gui.tester.FileClassLoader

public class FileClassLoader
extends AbstractClassLoader

A special class loader to load a class from a given bytecode file. Give a bytecode file, this class loads the class defined in the bytecode file. For this, it provides a new method loadClass(File).

Version:
$Revision: 1.14 $
Author:
Yoonsik Cheon

Constructor Summary
FileClassLoader()
          Creates a new loader.
 
Method Summary
protected  Class<?> findClass(String name)
          Finds the specified class.
 Class<?> loadClass(File file)
          Loads the given bytecode file and returns the loaded class.
 
Methods inherited from class edu.utep.cs.jet.gui.AbstractClassLoader
loadClassData
 
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findResource, findResources, getPermissions, getURLs, newInstance, newInstance
 
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass
 
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, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileClassLoader

public FileClassLoader()
Creates a new loader.

Method Detail

loadClass

public Class<?> loadClass(File file)
                   throws ClassNotFoundException
Loads the given bytecode file and returns the loaded class.

Throws:
ClassNotFoundException

findClass

protected Class<?> findClass(String name)
                      throws ClassNotFoundException
Finds the specified class. This method is overridden here to load the bytecode file stored in the file field unless it is null; otherwise, the overridden method is called.

Overrides:
findClass in class URLClassLoader
Throws:
ClassNotFoundException

JET

JET is Copyright (C) 2005-2008 by The University of Texas at El Paso and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.