|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.ClassLoader
tcl.lang.TclClassLoader
public class TclClassLoader
TclClassLoader.java -- Implements the Class Loader for dynamically loading Tcl packages. When attempting to resolve and load a new Package the loader looks in four places to find the class. In order they are: 1) The unique cache, "classes", inside the TclClassLoader. 2) Using the system class loader (via the context class loader). 3) Any paths passed into the constructor via the pathList variable. 4) Any path in the interps env(TCL_CLASSPATH) variable. The class will be found if it is any of the above paths or if it is in a jar file located in one of the paths. TclClassLoader.java -- A class that helps filter directory listings when for jar/zip files during the class resolution stage. Copyright (c) 1997 by Sun Microsystems, Inc. See the file "license.terms" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
Constructor Summary | |
---|---|
TclClassLoader(Interp interp,
TclObject pathList,
ClassLoader parent)
|
Method Summary | |
---|---|
Class |
defineClass(String className,
byte[] classData)
Given an array of bytes that define a class, create the Class. |
void |
dispose()
Release resources, to ensure that interp has no references (especially in a container environment.) |
protected URL |
findResource(String resName)
Resolves the specified resource name to a URL via a search of env(TCL_CLASSPATH). |
URL |
getResource(String resName)
Attempt to resolve a resource using the parent class loader and then the tcl class loader. |
Class |
loadClass(String className)
Resolves the specified name to a Class. |
protected Class |
loadClass(String className,
boolean resolveIt)
Resolves the specified name to a Class. |
void |
removeCache(String className)
Remove the given className from the internal cache. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TclClassLoader(Interp interp, TclObject pathList, ClassLoader parent)
Method Detail |
---|
public void dispose()
public Class loadClass(String className) throws ClassNotFoundException, PackageNameException
loadClass
in class ClassLoader
ClassNotFoundException
PackageNameException
ClassLoader.loadClass(java.lang.String)
protected Class loadClass(String className, boolean resolveIt) throws ClassNotFoundException, PackageNameException, SecurityException
loadClass
in class ClassLoader
ClassNotFoundException
PackageNameException
SecurityException
ClassLoader.loadClass(java.lang.String, boolean)
protected URL findResource(String resName) throws PackageNameException
findResource
in class ClassLoader
PackageNameException
ClassLoader.findResource(java.lang.String)
public URL getResource(String resName)
getResource
in class ClassLoader
ClassLoader.getResource(java.lang.String)
public Class defineClass(String className, byte[] classData)
className
- Name of the class, possibly nullclassData
- Binary data of the class structure.
public void removeCache(String className)
className
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |