Logo Search packages:      
Sourcecode: jamvm version File versions

final ClassLoader java::lang::ClassLoader::getParent (  )  [inline]

Returns the parent of this classloader. If the parent of this classloader is the bootstrap classloader then this method returns null. A security check may be performed on RuntimePermission("getClassLoader").

SecurityException if the security check fails

Definition at line 470 of file ClassLoader.java.

References isAncestorOf(), and parent.

    // Check if we may return the parent classloader.
    SecurityManager sm = System.getSecurityManager();
    if (sm != null)
        Class c = VMSecurityManager.getClassContext()[1];
        ClassLoader cl = c.getClassLoader();
      if (cl != null && ! cl.isAncestorOf(this))
          sm.checkPermission(new RuntimePermission("getClassLoader"));
    return parent;

Generated by  Doxygen 1.6.0   Back to index