public class RhinoClassLoader extends URLClassLoader implements org.mozilla.javascript.GeneratedClassLoader
Modifier and Type | Field and Description |
---|---|
protected CodeSource |
codeSource
CodeSource for classes defined by this loader
|
protected URL |
documentURL
URL for the document referencing the script.
|
protected 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(URL documentURL,
ClassLoader parent)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Class |
defineClass(String name,
byte[] data)
Define and load a Java class
|
AccessControlContext |
getAccessControlContext()
Returns the AccessControlContext which should be associated with
RhinoCode.
|
protected PermissionCollection |
getPermissions(CodeSource codesource)
Returns the permissions for the given CodeSource object.
|
void |
linkClass(Class clazz)
Links the Java class.
|
addURL, close, definePackage, findClass, findResource, findResources, getProtectionDomainInternal, getResourceAsStream, getURLs, newInstance, newInstance
defineClass, defineClass, getProtectionDomain
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 URL documentURL
protected CodeSource codeSource
protected AccessControlContext rhinoAccessControlContext
public RhinoClassLoader(URL documentURL, ClassLoader parent)
documentURL
- the URL from which to load classes and resourcesparent
- the parent class loader for delegationpublic Class defineClass(String name, byte[] data)
defineClass
in interface org.mozilla.javascript.GeneratedClassLoader
public void linkClass(Class clazz)
linkClass
in interface org.mozilla.javascript.GeneratedClassLoader
public AccessControlContext getAccessControlContext()
protected PermissionCollection getPermissions(CodeSource codesource)
getPermissions
in class URLClassLoader
Copyright © 2000–2023 Apache Software Foundation. All rights reserved.