|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.ClassLoader
java.security.SecureClassLoader
org.bounce.JarClassLoader
public class JarClassLoader
A class loader for loading resources and classes out of a jar file. Overrides the findClass and the findResource methods.
| Constructor Summary | |
|---|---|
JarClassLoader(java.lang.ClassLoader parent,
java.net.URL url)
Creates a new JarClassLoader that will allow the loading of classes stored in the jar file supplied. |
|
JarClassLoader(java.net.URL url)
Creates a new JarClassLoader that will allow the loading of classes stored in the jar file supplied. |
|
| Method Summary | |
|---|---|
java.lang.Class |
findClass(java.lang.String name)
Checks the contents table for an occurence of the class. |
java.net.URL |
findResource(java.lang.String name)
Checks the contents table for an occurence of the resource file. |
| Methods inherited from class java.security.SecureClassLoader |
|---|
defineClass, defineClass, getPermissions |
| Methods inherited from class java.lang.ClassLoader |
|---|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResources, 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 |
|---|
public JarClassLoader(java.net.URL url)
throws java.io.IOException
url - the URL of the jar file
java.io.IOException - an error happened while reading
the contents of the jar file.
public JarClassLoader(java.lang.ClassLoader parent,
java.net.URL url)
throws java.io.IOException
parent - the parent classloader.url - the URL of the jar file
java.io.IOException - an error happened while reading
the contents of the jar file.| Method Detail |
|---|
public java.lang.Class findClass(java.lang.String name)
throws java.lang.ClassNotFoundException
findClass in class java.lang.ClassLoadername - the name of the class.
java.lang.ClassNotFoundException - the jar file did not contain
the class.public java.net.URL findResource(java.lang.String name)
findResource in class java.lang.ClassLoadername - the name of the resource.
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||