FileDocCategorySizeDatePackage
MockSecurityManager.javaAPI DocAndroid 1.5 API1994Wed May 06 22:41:04 BST 2009org.apache.harmony.luni.tests.java.lang

MockSecurityManager

public class MockSecurityManager extends SecurityManager

Fields Summary
String
deletedFile
String
readedFile
String
writedFile
Constructors Summary
Methods Summary
public voidcheckPermission(java.security.Permission perm)

        if (perm.equals(new RuntimePermission("createSecurityManager")) ||
//          perm.equals(new AWTPermission("accessEventQueue")) ||
            perm.equals(new RuntimePermission("createClassLoader")) ||
            perm.equals(new FilePermission(deletedFile,"delete")) ||
            perm.equals(new FilePermission(readedFile,"read")) ||
            perm.equals(new PropertyPermission("*", "read,write")) ||
            perm.equals(new PropertyPermission("key", "read")) ||
            perm.equals(new SecurityPermission("getPolicy")) ||
//          perm.equals(new AWTPermission("accessClipboard")) ||
            perm.equals(new FilePermission(writedFile,"write"))) {
            throw
            new SecurityException("Unable to create Security Manager");
        }
    
public intclassDepth(java.lang.String name)

        return super.classDepth(name);
    
public intclassLoaderDepth()

        return super.classLoaderDepth();
    
public java.lang.ClassLoadercurrentClassLoader()

        return super.currentClassLoader();
    
public java.lang.ClasscurrentLoadedClass()

        return super.currentLoadedClass();
    
public java.lang.Class[]getClassContext()

        return super.getClassContext();
    
public booleaninClass(java.lang.String name)

        return super.inClass(name);
    
public booleaninClassLoader()

        return super.inClassLoader();
    
public voidsetInCheck(boolean inCheck)

    
        
        super.inCheck = inCheck;