Save This Page
Home » apache-harmony-6.0-src-r917296-snapshot » java » security » [javadoc | source]
java.security
public class: SecureClassLoader [javadoc | source]
java.lang.Object
   java.lang.ClassLoader
      java.security.SecureClassLoader

Direct Known Subclasses:
    SystemClassLoader, URLClassLoader, SubURLClassLoader

{@code SecureClassLoader} represents a {@code ClassLoader} which associates the classes it loads with a code source and provide mechanisms to allow the relevant permissions to be retrieved.
Fields inherited from java.lang.ClassLoader:
classAssertionStatus,  classSigners,  defaultAssertionStatus,  clearAssertionStatus,  packageAssertionStatus
Constructor:
 protected SecureClassLoader() 
 protected SecureClassLoader(ClassLoader parent) 
    Constructs a new instance of {@code SecureClassLoader} with the specified parent {@code ClassLoader}.

    If a {@code SecurityManager} is installed, code calling this constructor needs the {@code SecurityPermission} {@code checkCreateClassLoader} to be granted, otherwise a {@code SecurityException} will be thrown.

    Parameters:
    parent - the parent {@code ClassLoader}.
    Throws:
    SecurityException - if a {@code SecurityManager} is installed and the caller does not have permission to invoke this constructor.
Method from java.security.SecureClassLoader Summary:
defineClass,   defineClass,   getPermissions
Methods from java.lang.ClassLoader:
clearAssertionStatus,   defineClass,   defineClass,   defineClass,   defineClass,   definePackage,   findClass,   findLibrary,   findLoadedClass,   findResource,   findResources,   findSystemClass,   getPackage,   getPackages,   getParent,   getResource,   getResourceAsStream,   getResources,   getStackClassLoader,   getSystemClassLoader,   getSystemResource,   getSystemResourceAsStream,   getSystemResources,   isSameOrAncestor,   isSystemClassLoader,   loadClass,   loadClass,   loadLibrary,   loadLibraryWithClassLoader,   registerInitiatedClass,   resolveClass,   setClassAssertionStatus,   setDefaultAssertionStatus,   setPackageAssertionStatus,   setSigners
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.security.SecureClassLoader Detail:
 protected final Class<?> defineClass(String name,
    ByteBuffer b,
    CodeSource cs) 
    Constructs a new class from an array of bytes containing a class definition in class file format with an optional {@code CodeSource}.
 protected final Class<?> defineClass(String name,
    byte[] b,
    int off,
    int len,
    CodeSource cs) 
    Constructs a new class from an array of bytes containing a class definition in class file format with an optional {@code CodeSource}.
 protected PermissionCollection getPermissions(CodeSource codesource) 
    Returns the {@code PermissionCollection} for the specified {@code CodeSource}.