Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.batik.script.rhino
Class RhinoClassLoader  view RhinoClassLoader download RhinoClassLoader.java

java.lang.Object
  extended byjava.lang.ClassLoader
      extended byjava.security.SecureClassLoader
          extended byjava.net.URLClassLoader
              extended byorg.apache.batik.script.rhino.RhinoClassLoader

public class RhinoClassLoader
extends java.net.URLClassLoader

This class loader implementation will work whether or not the documentURL is null.

Version:
$Id: RhinoClassLoader.java,v 1.10 2004/08/18 07:14:57 vhardy Exp $

Nested Class Summary
 
Nested classes inherited from class java.net.URLClassLoader
 
Nested classes inherited from class java.lang.ClassLoader
 
Field Summary
protected  java.security.CodeSource codeSource
          CodeSource for classes defined by this loader
protected  java.net.URL documentURL
          URL for the document referencing the script.
protected  java.security.AccessControlContext rhinoAccessControlContext
          The AccessControlContext which can be associated with code loaded by this class loader if it was running stand-alone (i.e., not invoked by code with lesser priviledges).
 
Fields inherited from class java.net.URLClassLoader
 
Fields inherited from class java.security.SecureClassLoader
 
Fields inherited from class java.lang.ClassLoader
 
Constructor Summary
RhinoClassLoader(java.net.URL documentURL, java.lang.ClassLoader parent)
          Constructor.
 
Method Summary
 java.lang.Class defineClass(java.lang.String name, byte[] data)
          Define and load a Java class
 java.security.AccessControlContext getAccessControlContext()
          Returns the AccessControlContext which should be associated with RhinoCode.
protected  java.security.PermissionCollection getPermissions(java.security.CodeSource codesource)
          Returns the permissions for the given CodeSource object.
(package private) static java.net.URL[] getURL(java.lang.ClassLoader parent)
          Helper, returns the URL array from the parent loader
 void linkClass(java.lang.Class clazz)
          Links the Java class.
 
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findClass, findResource, findResources, getURLs, newInstance, newInstance, toString
 
Methods inherited from class java.security.SecureClassLoader
defineClass
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, 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, wait, wait, wait
 

Field Detail

documentURL

protected java.net.URL documentURL
URL for the document referencing the script.


codeSource

protected java.security.CodeSource codeSource
CodeSource for classes defined by this loader


rhinoAccessControlContext

protected java.security.AccessControlContext rhinoAccessControlContext
The AccessControlContext which can be associated with code loaded by this class loader if it was running stand-alone (i.e., not invoked by code with lesser priviledges).

Constructor Detail

RhinoClassLoader

public RhinoClassLoader(java.net.URL documentURL,
                        java.lang.ClassLoader parent)
Constructor.

Method Detail

getURL

static java.net.URL[] getURL(java.lang.ClassLoader parent)
Helper, returns the URL array from the parent loader


defineClass

public java.lang.Class defineClass(java.lang.String name,
                                   byte[] data)
Define and load a Java class


linkClass

public void linkClass(java.lang.Class clazz)
Links the Java class.


getAccessControlContext

public java.security.AccessControlContext getAccessControlContext()
Returns the AccessControlContext which should be associated with RhinoCode.


getPermissions

protected java.security.PermissionCollection getPermissions(java.security.CodeSource codesource)
Returns the permissions for the given CodeSource object. Compared to URLClassLoader, this adds a FilePermission so that files under the same root directory as the document can be read.