public class RhinoClassLoader
extends java.net.URLClassLoader
implements org.mozilla.javascript.GeneratedClassLoader
Modifier and Type | Field and Description |
---|---|
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).
|
Constructor and Description |
---|
RhinoClassLoader(java.net.URL documentURL,
java.lang.ClassLoader parent)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
addURL, close, definePackage, findClass, findResource, findResources, getResourceAsStream, getURLs, newInstance, newInstance
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
protected java.net.URL documentURL
protected java.security.CodeSource codeSource
protected java.security.AccessControlContext rhinoAccessControlContext
public RhinoClassLoader(java.net.URL documentURL, java.lang.ClassLoader parent)
documentURL
- the URL from which to load classes and resourcesparent
- the parent class loader for delegationstatic java.net.URL[] getURL(java.lang.ClassLoader parent)
public java.lang.Class defineClass(java.lang.String name, byte[] data)
defineClass
in interface org.mozilla.javascript.GeneratedClassLoader
public void linkClass(java.lang.Class clazz)
linkClass
in interface org.mozilla.javascript.GeneratedClassLoader
public java.security.AccessControlContext getAccessControlContext()
protected java.security.PermissionCollection getPermissions(java.security.CodeSource codesource)
getPermissions
in class java.net.URLClassLoader