public class JasperLoader extends URLClassLoader
Constructor and Description |
---|
JasperLoader(URL[] urls,
ClassLoader parent,
PermissionCollection permissionCollection,
CodeSource codeSource,
Map<String,byte[]> bytecodes) |
Modifier and Type | Method and Description |
---|---|
Class |
findClass(String className) |
PermissionCollection |
getPermissions(CodeSource codeSource)
Get the Permissions for a CodeSource.
|
Class |
loadClass(String name)
Load the class with the specified name.
|
Class |
loadClass(String name,
boolean resolve)
Load the class with the specified name, searching using the following
algorithm until it finds and returns the class.
|
addURL, close, definePackage, findResource, findResources, getResourceAsStream, getURLs, newInstance, newInstance
defineClass, defineClass
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public JasperLoader(URL[] urls, ClassLoader parent, PermissionCollection permissionCollection, CodeSource codeSource, Map<String,byte[]> bytecodes)
public Class loadClass(String name) throws ClassNotFoundException
loadClass(String, boolean)
with false
as the second argument.loadClass
in class ClassLoader
name
- Name of the class to be loadedClassNotFoundException
- if the class was not foundpublic Class loadClass(String name, boolean resolve) throws ClassNotFoundException
ClassNotFoundException
.
findLoadedClass(String)
to check if the
class has already been loaded. If it has, the same
Class
object is returned.delegate
property is set to true
,
call the loadClass()
method of the parent class
loader, if any.findClass()
to find this class in our locally
defined repositories.loadClass()
method of our parent
class loader, if any.resolve
flag is true
, this method will then
call resolveClass(Class)
on the resulting Class object.loadClass
in class ClassLoader
name
- Name of the class to be loadedresolve
- If true
then resolve the classClassNotFoundException
- if the class was not foundpublic Class findClass(String className) throws ClassNotFoundException
findClass
in class URLClassLoader
ClassNotFoundException
public final PermissionCollection getPermissions(CodeSource codeSource)
Since this ClassLoader is only used for a JSP page in a web application context, we just return our preset PermissionCollection for the web app context.
getPermissions
in class URLClassLoader
codeSource
- Code source where the code was loaded fromCopyright © 2006–2018 TinyGroup. All rights reserved.