net.sf.jasperreports.engine.util
Class JRClassLoader
java.lang.Object
java.lang.ClassLoader
net.sf.jasperreports.engine.util.JRClassLoader
public class JRClassLoader
- extends ClassLoader
- Version:
- $Id: JRClassLoader.java 5180 2012-03-29 13:23:12Z teodord $
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
| Methods inherited from class java.lang.ClassLoader |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JRClassLoader
protected JRClassLoader()
JRClassLoader
protected JRClassLoader(ClassLoader parent)
getProtectionDomainFactory
protected static ProtectionDomainFactory getProtectionDomainFactory()
setProtectionDomain
public static void setProtectionDomain(ProtectionDomain protectionDomain)
- Sets the protection to be used for classes loaded via
the
loadClassFromBytes method.
By default, the protection domain of this class is used for the loaded classes.
- Parameters:
protectionDomain - the protection domain to be used- See Also:
loadClassFromBytes(String, byte[])
setProtectionDomainFactory
public 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.
For every instance of this class,
getProtectionDomain is called
and the resulting protection domain is used when loading classes through the newly created
classloader.
- Parameters:
protectionDomainFactory - the protection domain factory.- See Also:
ProtectionDomainFactory.getProtectionDomain(ClassLoader)
loadClassForName
public static Class<?> loadClassForName(String className)
throws ClassNotFoundException
- Throws:
ClassNotFoundException
loadClassForRealName
public static Class<?> loadClassForRealName(String className)
throws ClassNotFoundException
- Throws:
ClassNotFoundException
loadClassFromFile
public static Class<?> loadClassFromFile(String className,
File file)
throws IOException
- Throws:
IOException
loadClassFromBytes
public static Class<?> loadClassFromBytes(String className,
byte[] bytecodes)
loadClass
protected Class<?> loadClass(String className,
File file)
throws IOException
- Throws:
IOException
getProtectionDomain
protected ProtectionDomain getProtectionDomain()
loadClass
protected Class<?> loadClass(String className,
byte[] bytecodes)
getClassRealName
public static String getClassRealName(String className)
Copyright © 2012. All Rights Reserved.