// JML is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with JML; see the file COPYING.  If not, write to
// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.


package java.lang;

import java.security.*;
import java.lang.reflect.*;
import java.io.FileDescriptor;
import java.io.File;
import java.io.FilePermission;
import java.awt.AWTPermission;
import java.util.PropertyPermission;
import java.lang.RuntimePermission;
import java.net.SocketPermission;
import java.net.NetPermission;
import java.util.Hashtable;
import java.net.InetAddress;
import java.lang.reflect.Member;
import java.net.URL;


public class SecurityManager {

    // CLASS SPECIFICATIONS

    /*@
      @ 
      @*/

    // METHODS AND CONSTRUCTORS

    /** @deprecated */
    /*@
      @ 
      @*/
    public boolean getInCheck();

    /*@
      @ 
      @*/
    public SecurityManager();

    /*@
      @ 
      @*/
    protected Class[] getClassContext();

    /** @deprecated */
    /*@
      @ 
      @*/
    protected ClassLoader currentClassLoader();

    /** @deprecated */
    /*@
      @ 
      @*/
    protected Class currentLoadedClass();

    /** @deprecated */
    /*@
      @ 
      @*/
    protected int classDepth(String name);

    /** @deprecated */
    /*@
      @ 
      @*/
    protected int classLoaderDepth();

    /** @deprecated */
    /*@
      @ 
      @*/
    protected boolean inClass(String name);

    /** @deprecated */
    /*@
      @ 
      @*/
    protected boolean inClassLoader();

    /*@
      @ 
      @*/
    public Object getSecurityContext();

    /*@
      @ 
      @*/
    public void checkPermission(Permission perm);

    /*@
      @ 
      @*/
    public void checkPermission(Permission perm, Object context);

    /*@
      @ 
      @*/
    public void checkCreateClassLoader();

    /*@
      @ 
      @*/
    public void checkAccess(Thread t);

    /*@
      @ 
      @*/
    public void checkAccess(ThreadGroup g);

    /*@
      @ 
      @*/
    public void checkExit(int status);

    /*@
      @ 
      @*/
    public void checkExec(String cmd);

    /*@
      @ 
      @*/
    public void checkLink(String lib);

    /*@
      @ 
      @*/
    public void checkRead(FileDescriptor fd);

    /*@
      @ 
      @*/
    public void checkRead(String file);

    /*@
      @ 
      @*/
    public void checkRead(String file, Object context);

    /*@
      @ 
      @*/
    public void checkWrite(FileDescriptor fd);

    /*@
      @ 
      @*/
    public void checkWrite(String file);

    /*@
      @ 
      @*/
    public void checkDelete(String file);

    /*@
      @ 
      @*/
    public void checkConnect(String host, int port);

    /*@
      @ 
      @*/
    public void checkConnect(String host, int port, Object context);

    /*@
      @ 
      @*/
    public void checkListen(int port);

    /*@
      @ 
      @*/
    public void checkAccept(String host, int port);

    /*@
      @ 
      @*/
    public void checkMulticast(InetAddress maddr);

    /** @deprecated */
    /*@
      @ 
      @*/
    public void checkMulticast(InetAddress maddr, byte ttl);

    /*@
      @ 
      @*/
    public void checkPropertiesAccess();

    /*@
      @ 
      @*/
    public void checkPropertyAccess(String key);

    /*@
      @ 
      @*/
    public boolean checkTopLevelWindow(Object window);

    /*@
      @ 
      @*/
    public void checkPrintJobAccess();

    /*@
      @ 
      @*/
    public void checkSystemClipboardAccess();

    /*@
      @ 
      @*/
    public void checkAwtEventQueueAccess();

    /*@
      @ 
      @*/
    public void checkPackageAccess(String pkg);

    /*@
      @ 
      @*/
    public void checkPackageDefinition(String pkg);

    /*@
      @ 
      @*/
    public void checkSetFactory();

    /*@
      @ 
      @*/
    public void checkMemberAccess(Class clazz, int which);

    /*@
      @ 
      @*/
    public void checkSecurityAccess(String target);

    /*@
      @ 
      @*/
    public ThreadGroup getThreadGroup();

    // FIELDS

    /** @deprecated */
    protected boolean inCheck;
}

