com.objectplanet.survey.plugin
Class PluginJARClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by com.objectplanet.survey.plugin.PluginJARClassLoader

public class PluginJARClassLoader
extends java.lang.ClassLoader

A class loader implementation that loads classes from JAR files.

Author:
Torgeir Punnerud
Created:
26. august 2002

Constructor Summary
PluginJARClassLoader()
          This constructor creates a class loader for loading classes from all plugins in one single Jar file.
PluginJARClassLoader(java.lang.String path)
          Constructor for the PluginJARClassLoader object
 
Method Summary
 void closeZipFile()
          Closes the ZIP file.
 java.util.zip.ZipFile getZipFile()
          Returns the ZIP file associated with this class loader.
 java.lang.Class loadClass(java.lang.String clazz, boolean resolveIt)
           
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginJARClassLoader

public PluginJARClassLoader()
This constructor creates a class loader for loading classes from all plugins in one single Jar file. To load plugins from more than one jar file, it must be handled outside this class.


PluginJARClassLoader

public PluginJARClassLoader(java.lang.String path)
                     throws java.io.IOException
Constructor for the PluginJARClassLoader object

Parameters:
path - Path to the jar file
Throws:
java.io.IOException - IOException
Method Detail

getZipFile

public java.util.zip.ZipFile getZipFile()
Returns the ZIP file associated with this class loader.

Returns:
The zipFile value

loadClass

public java.lang.Class loadClass(java.lang.String clazz,
                                 boolean resolveIt)
                          throws java.lang.ClassNotFoundException
Overrides:
loadClass in class java.lang.ClassLoader
Parameters:
clazz - Description of Parameter
resolveIt - Description of Parameter
Returns:
Description of the Returned Value
Throws:
java.lang.ClassNotFoundException - if the class could not be found

closeZipFile

public void closeZipFile()
Closes the ZIP file. This plugin will no longer be usable after this.


Copyright ? ObjectPlanet Inc. All Rights Reserved.

Built on December 20 2016