Package dk.netarkivet.common.utils.batch
Class ByteJarLoader
- java.lang.Object
-
- java.lang.ClassLoader
-
- dk.netarkivet.common.utils.batch.ByteJarLoader
-
- All Implemented Interfaces:
Serializable
public class ByteJarLoader extends ClassLoader implements Serializable
ByteJarLoader is a ClassLoader that stores java classes in a map where the key to the map is the class name, and the value is the class stored as a byte array.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ByteJarLoader(File... files)
Constructor for the ByteLoader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class
findClass(String className)
Lookup and return the Class with the given className.-
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, 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, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
-
-
-
Constructor Detail
-
ByteJarLoader
public ByteJarLoader(File... files)
Constructor for the ByteLoader.- Parameters:
files
- An array of files, which are assumed to be jar-files, but they need not have the extension .jar
-
-
Method Detail
-
findClass
public Class findClass(String className) throws ClassNotFoundException
Lookup and return the Class with the given className. This method overrides the ClassLoader.findClass method.- Overrides:
findClass
in classClassLoader
- Parameters:
className
- The name of the class to lookup- Returns:
- the Class with the given className.
- Throws:
ClassNotFoundException
- If the class could not be found
-
-