public class ByteArrayClassLoader extends ClassLoader
ClassLoader
allows for the loading of a set of Java™ classes
provided in class file format.Constructor and Description |
---|
ByteArrayClassLoader(Map classes)
The given
Map of classes must not be modified afterwards. |
ByteArrayClassLoader(Map classes,
ClassLoader parent) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
An object is regarded equal to
this iff
It is also an instance of ByteArrayClassLoader
Both have the same parent ClassLoader
Exactly the same classes (name, bytecode) were added to both
Roughly speaking, equal ByteArrayClassLoader s will return functionally identical
Class es on ClassLoader.loadClass(java.lang.String) . |
protected Class |
findClass(String name)
Implements
ClassLoader.findClass(String) . |
int |
hashCode() |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public ByteArrayClassLoader(Map classes)
Map
of classes must not be modified afterwards.classes
- String className => byte[] datapublic ByteArrayClassLoader(Map 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
public boolean equals(Object o)
this
iff
ByteArrayClassLoader
ClassLoader
ByteArrayClassLoader
s will return functionally identical
Class
es on ClassLoader.loadClass(java.lang.String)
.Copyright © 2001-2012. All Rights Reserved.