Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.security

Class SecureClassLoader

java.lang.Object
|
+--java.lang.ClassLoader
   |
   +--java.security.SecureClassLoader


public class SecureClassLoader

extends ClassLoader

A Secure Class Loader for loading classes with additional support for specifying code source and permissions when they are retrieved by the system policy handler.

Since:Author:

Constructor Summary

SecureClassLoader(java.lang.ClassLoader parent)

A Secure Class Loader for loading classes with additional support for specifying code source and permissions when they are retrieved by the system policy handler.
SecureClassLoader()

Method Summary

java.lang.ClassdefineClass(java.lang.String name, byte[] b, int off, int len, java.security.CodeSource cs)

Creates a class using an array of bytes and a CodeSource.
java.security.PermissionCollectiongetPermissions(java.security.CodeSource cs)

Returns a PermissionCollection for the specified CodeSource.

Constructor Details

SecureClassLoader

protected SecureClassLoader()


SecureClassLoader

protected SecureClassLoader(java.lang.ClassLoader parent)

A Secure Class Loader for loading classes with additional support for specifying code source and permissions when they are retrieved by the system policy handler.

Since:Author:Parameters:


Method Details

defineClass

protected final Class defineClass(java.lang.String name, byte[] b, int off, int len, java.security.CodeSource cs)

Creates a class using an array of bytes and a CodeSource.

Parameters:

Returns:

Throws:


getPermissions

protected PermissionCollection getPermissions(java.security.CodeSource cs)

Returns a PermissionCollection for the specified CodeSource. The default implmentation invokes java.security.Policy.getPermissions. This method is called by defineClass that takes a CodeSource arguement to build a proper ProtectionDomain for the class being defined.

Parameters: