home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1999 April / DPPCPRO0499.ISO / April / Notes / 50b2wic.exe / DATA1.CAB / NotesProgramFilesJavaSupport / rt.jar / java / lang / SecurityManager.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-04-23  |  3.4 KB  |  168 lines

  1. package java.lang;
  2.  
  3. import java.io.FileDescriptor;
  4. import java.net.InetAddress;
  5.  
  6. public abstract class SecurityManager {
  7.    protected boolean inCheck;
  8.    private boolean initialized = false;
  9.  
  10.    public boolean getInCheck() {
  11.       return this.inCheck;
  12.    }
  13.  
  14.    protected SecurityManager() {
  15.       if (System.getSecurityManager() != null) {
  16.          throw new SecurityException("security manager already installed.");
  17.       } else {
  18.          this.initialized = true;
  19.       }
  20.    }
  21.  
  22.    protected native Class[] getClassContext();
  23.  
  24.    protected native ClassLoader currentClassLoader();
  25.  
  26.    protected Class currentLoadedClass() {
  27.       return this.currentLoadedClass0();
  28.    }
  29.  
  30.    protected native int classDepth(String var1);
  31.  
  32.    protected native int classLoaderDepth();
  33.  
  34.    protected boolean inClass(String var1) {
  35.       return this.classDepth(var1) >= 0;
  36.    }
  37.  
  38.    protected boolean inClassLoader() {
  39.       return this.currentClassLoader() != null;
  40.    }
  41.  
  42.    public Object getSecurityContext() {
  43.       return null;
  44.    }
  45.  
  46.    public void checkCreateClassLoader() {
  47.       throw new SecurityException();
  48.    }
  49.  
  50.    public void checkAccess(Thread var1) {
  51.       throw new SecurityException();
  52.    }
  53.  
  54.    public void checkAccess(ThreadGroup var1) {
  55.       throw new SecurityException();
  56.    }
  57.  
  58.    public void checkExit(int var1) {
  59.       throw new SecurityException();
  60.    }
  61.  
  62.    public void checkExec(String var1) {
  63.       throw new SecurityException();
  64.    }
  65.  
  66.    public void checkLink(String var1) {
  67.       throw new SecurityException();
  68.    }
  69.  
  70.    public void checkRead(FileDescriptor var1) {
  71.       throw new SecurityException();
  72.    }
  73.  
  74.    public void checkRead(String var1) {
  75.       throw new SecurityException();
  76.    }
  77.  
  78.    public void checkRead(String var1, Object var2) {
  79.       throw new SecurityException();
  80.    }
  81.  
  82.    public void checkWrite(FileDescriptor var1) {
  83.       throw new SecurityException();
  84.    }
  85.  
  86.    public void checkWrite(String var1) {
  87.       throw new SecurityException();
  88.    }
  89.  
  90.    public void checkDelete(String var1) {
  91.       throw new SecurityException();
  92.    }
  93.  
  94.    public void checkConnect(String var1, int var2) {
  95.       throw new SecurityException();
  96.    }
  97.  
  98.    public void checkConnect(String var1, int var2, Object var3) {
  99.       throw new SecurityException();
  100.    }
  101.  
  102.    public void checkListen(int var1) {
  103.       throw new SecurityException();
  104.    }
  105.  
  106.    public void checkAccept(String var1, int var2) {
  107.       throw new SecurityException();
  108.    }
  109.  
  110.    public void checkMulticast(InetAddress var1) {
  111.       throw new SecurityException();
  112.    }
  113.  
  114.    public void checkMulticast(InetAddress var1, byte var2) {
  115.       throw new SecurityException();
  116.    }
  117.  
  118.    public void checkPropertiesAccess() {
  119.       throw new SecurityException();
  120.    }
  121.  
  122.    public void checkPropertyAccess(String var1) {
  123.       throw new SecurityException();
  124.    }
  125.  
  126.    public boolean checkTopLevelWindow(Object var1) {
  127.       return false;
  128.    }
  129.  
  130.    public void checkPrintJobAccess() {
  131.       throw new SecurityException();
  132.    }
  133.  
  134.    public void checkSystemClipboardAccess() {
  135.       throw new SecurityException();
  136.    }
  137.  
  138.    public void checkAwtEventQueueAccess() {
  139.       throw new SecurityException();
  140.    }
  141.  
  142.    public void checkPackageAccess(String var1) {
  143.       throw new SecurityException();
  144.    }
  145.  
  146.    public void checkPackageDefinition(String var1) {
  147.       throw new SecurityException();
  148.    }
  149.  
  150.    public void checkSetFactory() {
  151.       throw new SecurityException();
  152.    }
  153.  
  154.    public void checkMemberAccess(Class var1, int var2) {
  155.       throw new SecurityException();
  156.    }
  157.  
  158.    public void checkSecurityAccess(String var1) {
  159.       throw new SecurityException();
  160.    }
  161.  
  162.    private native Class currentLoadedClass0();
  163.  
  164.    public ThreadGroup getThreadGroup() {
  165.       return Thread.currentThread().getThreadGroup();
  166.    }
  167. }
  168.