public class ByteArrayClassLoader extends ClassLoader
ClassLoader
allows for the loading of a set of Java™ classes provided in class file format.Constructor | Description |
---|---|
ByteArrayClassLoader(Map<String,byte[]> classes) |
The given
Map of classes must not be modified afterwards. |
ByteArrayClassLoader(Map<String,byte[]> classes,
ClassLoader parent) |
Modifier and Type | Method | Description |
---|---|---|
protected Class |
findClass(String name) |
Implements
ClassLoader.findClass(String) . |
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
public ByteArrayClassLoader(Map<String,byte[]> classes)
Map
of classes must not be modified afterwards.classes
- String className => byte[] datapublic ByteArrayClassLoader(Map<String,byte[]> classes, ClassLoader parent)
ByteArrayClassLoader(Map)
protected Class findClass(String name) throws ClassNotFoundException
ClassLoader.findClass(String)
.
Notice that, although nowhere documented, no more than one thread at a time calls this
method, because ClassLoader.loadClass(java.lang.String)
is
synchronized
.
findClass
in class ClassLoader
ClassNotFoundException
Copyright © 2001–2019. All rights reserved.