Package gnu.bytecode
Class ZipLoader
- java.lang.Object
-
- java.lang.ClassLoader
-
- gnu.bytecode.ZipLoader
-
public class ZipLoader extends ClassLoader
Load classes from a Zip archive.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close the zip archive - loadClass will reopen if necessary.Class
loadAllClasses()
Load all classes immediately from zip archive, close archive.Class
loadClass(String name, boolean resolve)
-
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findClass, findLibrary, findLoadedClass, findResource, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
-
-
-
Constructor Detail
-
ZipLoader
public ZipLoader(String name) throws IOException
- Throws:
IOException
-
-
Method Detail
-
loadClass
public Class loadClass(String name, boolean resolve) throws ClassNotFoundException
- Overrides:
loadClass
in classClassLoader
- Throws:
ClassNotFoundException
-
loadAllClasses
public Class loadAllClasses() throws IOException
Load all classes immediately from zip archive, close archive.- Returns:
- main class (1st class in archive).
- Throws:
IOException
-
close
public void close() throws IOException
Close the zip archive - loadClass will reopen if necessary.- Throws:
IOException
-
-