public class JRClassLoader extends ClassLoader
| Modifier | Constructor and Description |
|---|---|
protected |
JRClassLoader() |
protected |
JRClassLoader(ClassLoader parent) |
| Modifier and Type | Method and Description |
|---|---|
static String |
getClassRealName(String className) |
protected ProtectionDomain |
getProtectionDomain() |
protected static ProtectionDomainFactory |
getProtectionDomainFactory() |
protected Class<?> |
loadClass(String className,
byte[] bytecodes) |
protected Class<?> |
loadClass(String className,
File file) |
static Class<?> |
loadClassForName(String className) |
static Class<?> |
loadClassForRealName(String className) |
static Class<?> |
loadClassFromBytes(String className,
byte[] bytecodes) |
static Class<?> |
loadClassFromFile(String className,
File file) |
static void |
setProtectionDomain(ProtectionDomain protectionDomain)
Sets the protection to be used for classes loaded via
the
loadClassFromBytes method. |
static void |
setProtectionDomainFactory(ProtectionDomainFactory protectionDomainFactory)
Sets a protection domain factory to be used for creating protection domains
for the classes loaded by instances of this class.
|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignersprotected JRClassLoader()
protected JRClassLoader(ClassLoader parent)
protected static ProtectionDomainFactory getProtectionDomainFactory()
public static void setProtectionDomain(ProtectionDomain protectionDomain)
loadClassFromBytes method.
By default, the protection domain of this class is used for the loaded classes.protectionDomain - the protection domain to be usedloadClassFromBytes(String, byte[])public static void setProtectionDomainFactory(ProtectionDomainFactory protectionDomainFactory)
For every instance of this class,
getProtectionDomain is called
and the resulting protection domain is used when loading classes through the newly created
classloader.
protectionDomainFactory - the protection domain factory.ProtectionDomainFactory.getProtectionDomain(ClassLoader)public static Class<?> loadClassForName(String className) throws ClassNotFoundException
ClassNotFoundExceptionpublic static Class<?> loadClassForRealName(String className) throws ClassNotFoundException
ClassNotFoundExceptionpublic static Class<?> loadClassFromFile(String className, File file) throws IOException
IOExceptionprotected Class<?> loadClass(String className, File file) throws IOException
IOExceptionprotected ProtectionDomain getProtectionDomain()
Copyright © 2017. All rights reserved.