public class MemoryClassLoader
extends java.lang.ClassLoader
ClassLoader that loads classes from memory.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MEMORY_CLASS_URL
URL used to identify the
CodeSource of the ProtectionDomain used by this class loader. |
| Constructor and Description |
|---|
MemoryClassLoader(java.util.Map<java.lang.String,byte[]> mapClassBytes,
java.lang.ClassLoader parent)
Creates a
MemoryClassLoader. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Class<?> |
loadClass(java.lang.String name) |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignerspublic static final java.lang.String MEMORY_CLASS_URL
CodeSource of the ProtectionDomain used by this class loader.
This is useful to identify classes loaded by this class loader in a policy file.
grant codeBase "jrt:/ch.obermuhlner.scriptengine.java/memory-class" {
permission java.lang.RuntimePermission "exitVM";
};
public MemoryClassLoader(java.util.Map<java.lang.String,byte[]> mapClassBytes,
java.lang.ClassLoader parent)
MemoryClassLoader.mapClassBytes - the map of class names to compiled classesparent - the parent ClassLoader