|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.ClassLoader
ucar.unidata.util.PluginClassLoader
public class PluginClassLoader
Class PluginClassLoader. Loads plugin classes
| Field Summary | |
|---|---|
static String |
PLUGIN_PROTOCOL
for url plugins |
| Constructor Summary | |
|---|---|
PluginClassLoader(String jarFilePath,
ClassLoader parent)
ctor |
|
| Method Summary | |
|---|---|
protected void |
checkClass(Class c)
|
void |
closeJar()
Close the jar file |
protected String |
defineResource(JarEntry jarEntry)
Associate the resource name with the jar entry |
Class |
getClassFromPlugin(String name)
Check if this class is one we loaded from a plugin |
List |
getEntryNames()
Get the list of (String) names of the non-class files in the jar |
URL |
getResource(String resource)
Open the resource as a URL |
InputStream |
getResourceAsStream(String resource)
Open the resource as a istream if we have it |
protected void |
handleError(String msg,
Throwable exc)
|
Class |
loadClass(String name)
Overwrite base class method to load in a class by name |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String PLUGIN_PROTOCOL
| Constructor Detail |
|---|
public PluginClassLoader(String jarFilePath,
ClassLoader parent)
throws IOException
jarFilePath - Where the jar file isparent - parent
IOException - On badness| Method Detail |
|---|
public String toString()
toString in class Object
protected void handleError(String msg,
Throwable exc)
public void closeJar()
public List getEntryNames()
protected void checkClass(Class c)
throws Exception
Exception
public Class loadClass(String name)
throws ClassNotFoundException
loadClass in class ClassLoadername - class name
ClassNotFoundException - On badnesspublic Class getClassFromPlugin(String name)
protected String defineResource(JarEntry jarEntry)
jarEntry - THe entrypublic URL getResource(String resource)
getResource in class ClassLoaderresource - The resource
public InputStream getResourceAsStream(String resource)
getResourceAsStream in class ClassLoaderresource - The resource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||