Package net.sf.jasperreports.engine.util
Class JRClassLoader
java.lang.Object
java.lang.ClassLoader
net.sf.jasperreports.engine.util.JRClassLoader
- Direct Known Subclasses:
CompiledClassesLoader
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedJRClassLoader(ClassLoader parent) protectedJRClassLoader(ClassLoader parent, ClassLoaderFilter classLoaderFilter) protectedJRClassLoader(ClassLoaderFilter classLoaderFilter) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetClassRealName(String className) protected ProtectionDomainstatic ProtectionDomainFactoryprotected Class<?> protected Class<?> protected Class<?> static Class<?> loadClassForName(String className) static Class<?> loadClassForRealName(String className) static Class<?> loadClassFromBytes(String className, byte[] bytecodes) static Class<?> loadClassFromBytes(ClassLoaderFilter classLoaderFilter, String className, byte[] bytecodes) static Class<?> loadClassFromBytes(ClassLoaderFilter classLoaderFilter, String className, CompiledClasses compiledClasses) static Class<?> loadClassFromFile(String className, File file) static voidsetProtectionDomain(ProtectionDomain protectionDomain) Sets the protection to be used for classes loaded via theloadClassFromBytesmethod.static voidsetProtectionDomainFactory(ProtectionDomainFactory protectionDomainFactory) Sets a protection domain factory to be used for creating protection domains for the classes loaded by instances of this class.Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, 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, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Constructor Details
-
JRClassLoader
protected JRClassLoader() -
JRClassLoader
-
JRClassLoader
-
JRClassLoader
-
-
Method Details
-
getProtectionDomainFactory
-
setProtectionDomain
Sets the protection to be used for classes loaded via theloadClassFromBytesmethod. By default, the protection domain of this class is used for the loaded classes.- Parameters:
protectionDomain- the protection domain to be used- See Also:
-
setProtectionDomainFactory
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,
getProtectionDomainis called and the resulting protection domain is used when loading classes through the newly created classloader.- Parameters:
protectionDomainFactory- the protection domain factory.- See Also:
-
loadClassForName
- Throws:
ClassNotFoundException
-
loadClassForRealName
- Throws:
ClassNotFoundException
-
loadClassFromFile
- Throws:
IOException
-
loadClassFromBytes
-
loadClassFromBytes
public static Class<?> loadClassFromBytes(ClassLoaderFilter classLoaderFilter, String className, byte[] bytecodes) -
loadClassFromBytes
public static Class<?> loadClassFromBytes(ClassLoaderFilter classLoaderFilter, String className, CompiledClasses compiledClasses) -
loadClass
- Throws:
IOException
-
getProtectionDomain
-
loadClass
-
loadClass
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException, JRRuntimeException - Overrides:
loadClassin classClassLoader- Throws:
ClassNotFoundExceptionJRRuntimeException
-
getClassRealName
-