org.apache.jasper.servlet
类 JasperLoader

java.lang.Object
  继承者 java.lang.ClassLoader
      继承者 java.security.SecureClassLoader
          继承者 java.net.URLClassLoader
              继承者 org.apache.jasper.servlet.JasperLoader

public class JasperLoader
extends URLClassLoader

Class loader for loading servlet class files (corresponding to JSP files) and tag handler class files (corresponding to tag files).

作者:
Anil K. Vijendran, Harish Prabandham, Jean-Francois Arcand, Kin-man Chung

构造方法摘要
JasperLoader(URL[] urls, ClassLoader parent, PermissionCollection permissionCollection, CodeSource codeSource, Map<String,byte[]> bytecodes)
           
 
方法摘要
 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.
 
从类 java.net.URLClassLoader 继承的方法
addURL, definePackage, findResource, findResources, getURLs, newInstance, newInstance
 
从类 java.security.SecureClassLoader 继承的方法
defineClass, defineClass
 
从类 java.lang.ClassLoader 继承的方法
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

JasperLoader

public JasperLoader(URL[] urls,
                    ClassLoader parent,
                    PermissionCollection permissionCollection,
                    CodeSource codeSource,
                    Map<String,byte[]> bytecodes)
方法详细信息

loadClass

public Class loadClass(String name)
                throws ClassNotFoundException
Load the class with the specified name. This method searches for classes in the same manner as loadClass(String, boolean) with false as the second argument.

覆盖:
ClassLoader 中的 loadClass
参数:
name - Name of the class to be loaded
抛出:
ClassNotFoundException - if the class was not found

loadClass

public Class loadClass(String name,
                       boolean resolve)
                throws ClassNotFoundException
Load the class with the specified name, searching using the following algorithm until it finds and returns the class. If the class cannot be found, returns ClassNotFoundException. If the class was found using the above steps, and the resolve flag is true, this method will then call resolveClass(Class) on the resulting Class object.

覆盖:
ClassLoader 中的 loadClass
参数:
name - Name of the class to be loaded
resolve - If true then resolve the class
抛出:
ClassNotFoundException - if the class was not found

findClass

public Class findClass(String className)
                throws ClassNotFoundException
覆盖:
URLClassLoader 中的 findClass
抛出:
ClassNotFoundException

getPermissions

public final PermissionCollection getPermissions(CodeSource codeSource)
Get the Permissions for a 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.

覆盖:
URLClassLoader 中的 getPermissions
参数:
codeSource - Code source where the code was loaded from
返回:
PermissionCollection for CodeSource


Copyright © 2013. All Rights Reserved.