/[classpath]/classpath/vm/reference/java/lang/VMSecurityManager.java
ViewVC logotype

Diff of /classpath/vm/reference/java/lang/VMSecurityManager.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by mark, Tue Jan 22 22:27:03 2002 UTC revision 1.9 by ericb, Sat Feb 23 09:19:52 2002 UTC
# Line 1  Line 1 
1  /* VMSecurityManager.java  /* VMSecurityManager.java -- Reference implementation of VM hooks for security
2     Copyright (C) 1998 Free Software Foundation     Copyright (C) 1998, 2002 Free Software Foundation
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 37  exception statement from your version. * Line 37  exception statement from your version. *
37    
38  package java.lang;  package java.lang;
39    
 import java.net.*;  
 import java.util.*;  
 import java.io.*;  
   
40  /**  /**
41   ** VMSecurityManager is a helper class for SecurityManager the VM must   * VMSecurityManager is a helper class for SecurityManager the VM must
42   ** implement.   * implement.
43   **   *
44   ** @author  John Keiser   * @author John Keiser
45   ** @version 1.1.0, 31 May 1998   * @author Eric Blake <ebb9@email.byu.edu>
46   **/   */
47  class VMSecurityManager {  final class VMSecurityManager
48          /** Get a list of all the classes currently executing  {
49           ** methods on the Java stack.  getClassContext()[0] is    /**
50           ** the currently executing method     * Get a list of all the classes currently executing methods on the
51           ** <STRONG>Spec Note:</STRONG> does not say whether     * Java stack.  getClassContext()[0] is the currently executing method, ie.
52           ** the stack will include the getClassContext() call or     * the method which called SecurityManager.getClassContext().  (Hint: you
53           ** the one just before it.     * may need to pop off one or more frames: don't include SecurityManager
54           **     * or VMSecurityManager.getClassContext in your result. Also, be sure that
55           ** @return an array containing all the methods on classes     * you correctly handle the context if SecurityManager.getClassContext
56           **         on the Java execution stack.     * was invoked by reflection).
57           **/     *
58          static native Class[] getClassContext();     * @return an array of the declaring classes of each stack frame
59       */
60          /** Get the current ClassLoader--the one nearest to the    static native Class[] getClassContext();
61           ** top of the stack.  
62           ** @return the current ClassLoader.    /**
63           **/     * Get the current ClassLoader--the one nearest to the top of the stack.
64          static native ClassLoader currentClassLoader();     *
65       * @return the current ClassLoader
66       */
67      static native ClassLoader currentClassLoader();
68  }  }

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26