JML

java.lang
Class ClassLoader

java.lang.Object
  extended byjava.lang.ClassLoader
Direct Known Subclasses:
ChxClassLoader, FunctionalTestSuite.TestCase.FunctionalTestSuite$TestCase$3, RMJClassLoader

public abstract class ClassLoader
extends Object


Nested Class Summary
(package private) static class ClassLoader.NativeLibrary
           
 
Field Summary
private static sun.misc.URLClassPath bootstrapClassPath
           
(package private)  Map classAssertionStatus
           
private  Vector classes
           
private  boolean defaultAssertionStatus
           
private  ProtectionDomain defaultDomain
           
private  Set domains
           
private  boolean initialized
           
private static Vector loadedLibraryNames
           
private  Vector nativeLibraries
           
private static Stack nativeLibraryContext
           
(package private)  Certificate[] nocerts
           
private  Hashtable package2certs
           
private  Map packageAssertionStatus
           
private  HashMap packages
           
private  ClassLoader parent
           
private static ClassLoader scl
           
private static boolean sclSet
           
private static String[] sys_paths
           
private static Vector systemNativeLibraries
           
private static String[] usr_paths
           
 
Constructor Summary
protected ClassLoader()
           
protected ClassLoader(ClassLoader)
           
 
Method Summary
(package private)  void addClass(Class)
           
private  void check()
           
private  void checkCerts(String, CodeSource)
           
private  boolean checkName(String)
           
private  void checkPackageAccess(Class, ProtectionDomain)
           
 void clearAssertionStatus()
           
private  boolean compareCerts(Certificate[], Certificate[])
           
protected  Class defineClass(byte[], int, int)
           
protected  Class defineClass(String, byte[], int, int)
           
protected  Class defineClass(String, byte[], int, int, ProtectionDomain)
           
protected  Class defineClass(String, ByteBuffer, ProtectionDomain)
           
private  Class defineClass0(String, byte[], int, int, ProtectionDomain)
           
private  Class defineClass1(String, byte[], int, int, ProtectionDomain, String)
           
private  Class defineClass2(String, ByteBuffer, int, int, ProtectionDomain, String)
           
private  String defineClassSourceLocation(ProtectionDomain)
           
protected  Package definePackage(String, String, String, String, String, String, String, URL)
           
private  Class defineTransformedClass(String, byte[], int, int, ProtectionDomain, ClassFormatError, String)
           
(package private)  boolean desiredAssertionStatus(String)
           
private  Class findBootstrapClass(String)
           
private  Class findBootstrapClass0(String)
           
protected  Class findClass(String)
           
protected  String findLibrary(String)
           
protected  Class findLoadedClass(String)
           
private  Class findLoadedClass0(String)
           
(package private) static long findNative(ClassLoader, String)
           
protected  URL findResource(String)
           
protected  Enumeration findResources(String)
           
protected  Class findSystemClass(String)
           
(package private) static sun.misc.URLClassPath getBootstrapClassPath()
           
private static URL getBootstrapResource(String)
           
private static Enumeration getBootstrapResources(String)
           
(package private) static ClassLoader getCallerClassLoader()
           
private  ProtectionDomain getDefaultDomain()
           
protected  Package getPackage(String)
           
protected  Package[] getPackages()
           
 ClassLoader getParent()
           
 URL getResource(String)
           
 InputStream getResourceAsStream(String)
           
 Enumeration getResources(String)
           
static ClassLoader getSystemClassLoader()
           
static URL getSystemResource(String)
           
static InputStream getSystemResourceAsStream(String)
           
static Enumeration getSystemResources(String)
           
private  void initializeJavaAssertionMaps()
           
private static String[] initializePath(String)
           
private static void initSystemClassLoader()
           
(package private)  boolean isAncestor(ClassLoader)
           
 Class loadClass(String)
           
protected  Class loadClass(String, boolean)
           
private  Class loadClassInternal(String)
           
(package private) static void loadLibrary(Class, String, boolean)
           
private static boolean loadLibrary0(Class, File)
           
private  void postDefineClass(Class, ProtectionDomain)
           
private  ProtectionDomain preDefineClass(String, ProtectionDomain)
           
private static void registerNatives()
           
protected  void resolveClass(Class)
           
private  void resolveClass0(Class)
           
private static AssertionStatusDirectives retrieveDirectives()
           
 void setClassAssertionStatus(String, boolean)
           
 void setDefaultAssertionStatus(boolean)
           
 void setPackageAssertionStatus(String, boolean)
           
protected  void setSigners(Class, Object[])
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

systemNativeLibraries

private static Vector systemNativeLibraries

defaultAssertionStatus

private boolean defaultAssertionStatus

scl

private static ClassLoader scl

domains

private Set domains

bootstrapClassPath

private static sun.misc.URLClassPath bootstrapClassPath

usr_paths

private static String[] usr_paths

package2certs

private Hashtable package2certs

initialized

private boolean initialized

nativeLibraryContext

private static Stack nativeLibraryContext

sclSet

private static boolean sclSet

nativeLibraries

private Vector nativeLibraries

packages

private HashMap packages

sys_paths

private static String[] sys_paths

classes

private Vector classes

nocerts

Certificate[] nocerts

packageAssertionStatus

private Map packageAssertionStatus

parent

private ClassLoader parent

loadedLibraryNames

private static Vector loadedLibraryNames

defaultDomain

private ProtectionDomain defaultDomain

classAssertionStatus

Map classAssertionStatus
Constructor Detail

ClassLoader

protected ClassLoader(ClassLoader)

ClassLoader

protected ClassLoader()
Method Detail

registerNatives

private static void registerNatives()

addClass

void addClass(Class)

loadClass

public Class loadClass(String)
                throws ClassNotFoundException
Throws:
ClassNotFoundException

loadClass

protected Class loadClass(String,
                          boolean)
                   throws ClassNotFoundException
Throws:
ClassNotFoundException

loadClassInternal

private Class loadClassInternal(String)
                         throws ClassNotFoundException
Throws:
ClassNotFoundException

checkPackageAccess

private void checkPackageAccess(Class,
                                ProtectionDomain)

findClass

protected Class findClass(String)
                   throws ClassNotFoundException
Throws:
ClassNotFoundException

defineClass

protected final Class defineClass(byte[],
                                  int,
                                  int)
                           throws ClassFormatError
Throws:
ClassFormatError

defineClass

protected final Class defineClass(String,
                                  byte[],
                                  int,
                                  int)
                           throws ClassFormatError
Throws:
ClassFormatError

preDefineClass

private ProtectionDomain preDefineClass(String,
                                        ProtectionDomain)

defineClassSourceLocation

private String defineClassSourceLocation(ProtectionDomain)

defineTransformedClass

private Class defineTransformedClass(String,
                                     byte[],
                                     int,
                                     int,
                                     ProtectionDomain,
                                     ClassFormatError,
                                     String)
                              throws ClassFormatError
Throws:
ClassFormatError

postDefineClass

private void postDefineClass(Class,
                             ProtectionDomain)

defineClass

protected final Class defineClass(String,
                                  byte[],
                                  int,
                                  int,
                                  ProtectionDomain)
                           throws ClassFormatError
Throws:
ClassFormatError

defineClass

protected final Class defineClass(String,
                                  ByteBuffer,
                                  ProtectionDomain)
                           throws ClassFormatError
Throws:
ClassFormatError

defineClass0

private Class defineClass0(String,
                           byte[],
                           int,
                           int,
                           ProtectionDomain)

defineClass1

private Class defineClass1(String,
                           byte[],
                           int,
                           int,
                           ProtectionDomain,
                           String)

defineClass2

private Class defineClass2(String,
                           ByteBuffer,
                           int,
                           int,
                           ProtectionDomain,
                           String)

checkName

private boolean checkName(String)

checkCerts

private void checkCerts(String,
                        CodeSource)

compareCerts

private boolean compareCerts(Certificate[],
                             Certificate[])

resolveClass

protected final void resolveClass(Class)

resolveClass0

private void resolveClass0(Class)

findSystemClass

protected final Class findSystemClass(String)
                               throws ClassNotFoundException
Throws:
ClassNotFoundException

findBootstrapClass0

private Class findBootstrapClass0(String)
                           throws ClassNotFoundException
Throws:
ClassNotFoundException

findBootstrapClass

private Class findBootstrapClass(String)
                          throws ClassNotFoundException
Throws:
ClassNotFoundException

check

private void check()

findLoadedClass

protected final Class findLoadedClass(String)

findLoadedClass0

private final Class findLoadedClass0(String)

setSigners

protected final void setSigners(Class,
                                Object[])

getResource

public URL getResource(String)

getResources

public Enumeration getResources(String)
                         throws IOException
Throws:
IOException

findResource

protected URL findResource(String)

findResources

protected Enumeration findResources(String)
                             throws IOException
Throws:
IOException

getSystemResource

public static URL getSystemResource(String)

getSystemResources

public static Enumeration getSystemResources(String)
                                      throws IOException
Throws:
IOException

getBootstrapResource

private static URL getBootstrapResource(String)

getBootstrapResources

private static Enumeration getBootstrapResources(String)
                                          throws IOException
Throws:
IOException

getBootstrapClassPath

static sun.misc.URLClassPath getBootstrapClassPath()

getResourceAsStream

public InputStream getResourceAsStream(String)

getSystemResourceAsStream

public static InputStream getSystemResourceAsStream(String)

getParent

public final ClassLoader getParent()

getSystemClassLoader

public static ClassLoader getSystemClassLoader()

initSystemClassLoader

private static void initSystemClassLoader()

isAncestor

boolean isAncestor(ClassLoader)

getCallerClassLoader

static ClassLoader getCallerClassLoader()

definePackage

protected Package definePackage(String,
                                String,
                                String,
                                String,
                                String,
                                String,
                                String,
                                URL)
                         throws IllegalArgumentException
Throws:
IllegalArgumentException

getPackage

protected Package getPackage(String)

getPackages

protected Package[] getPackages()

findLibrary

protected String findLibrary(String)

getDefaultDomain

private ProtectionDomain getDefaultDomain()

initializePath

private static String[] initializePath(String)

loadLibrary

static void loadLibrary(Class,
                        String,
                        boolean)

loadLibrary0

private static boolean loadLibrary0(Class,
                                    File)

findNative

static long findNative(ClassLoader,
                       String)

setDefaultAssertionStatus

public void setDefaultAssertionStatus(boolean)

setPackageAssertionStatus

public void setPackageAssertionStatus(String,
                                      boolean)

setClassAssertionStatus

public void setClassAssertionStatus(String,
                                    boolean)

clearAssertionStatus

public void clearAssertionStatus()

desiredAssertionStatus

boolean desiredAssertionStatus(String)

initializeJavaAssertionMaps

private void initializeJavaAssertionMaps()

retrieveDirectives

private static AssertionStatusDirectives retrieveDirectives()

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.